All tests pass!
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
import os
|
||||
import errno
|
||||
from fnmatch import fnmatch
|
||||
import warnings
|
||||
|
||||
def search_all_match(filename, path):
|
||||
# search part shamelessly copied from stack overflow...
|
||||
@@ -42,7 +43,6 @@ def select_path(paths):
|
||||
def search_file(filename, path):
|
||||
paths = search_all_match(filename, path)
|
||||
if len(paths) == 0 :
|
||||
print(f"No match for \"{filename}\". Link not modified.")
|
||||
raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), filename)
|
||||
raise Exception(f"No match found for {filename}")
|
||||
p = select_path(paths)
|
||||
return p
|
||||
|
||||
Reference in New Issue
Block a user