summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2019-05-08 22:19:44 +0200
committerjvoisin2019-05-08 22:34:32 +0200
commitf1a06e805b824cf366af43d51bec2b92b5cefdc8 (patch)
treec49d799c569da927ad99731b1747c015847ef681
parent4f0e0685cab4eb5e123c1b59e738c72b42f8fa6c (diff)
Fix an erroneous errors message
This one was spotted by @fuzzy
-rwxr-xr-xmat27
1 files changed, 6 insertions, 1 deletions
diff --git a/mat2 b/mat2
index e8d1883..f180d5c 100755
--- a/mat2
+++ b/mat2
@@ -32,7 +32,12 @@ def __check_file(filename: str, mode: int = os.R_OK) -> bool:
32 print("[-] %s is not a regular file." % filename) 32 print("[-] %s is not a regular file." % filename)
33 return False 33 return False
34 elif not os.access(filename, mode): 34 elif not os.access(filename, mode):
35 print("[-] %s is not readable and writeable." % filename) 35 mode_str = [] # type: List[str]
36 if mode & os.R_OK:
37 mode_str += 'readable'
38 if mode & os.W_OK:
39 mode_str += 'writeable'
40 print("[-] %s is not %s." % (filename, 'nor '.join(mode_str)))
36 return False 41 return False
37 return True 42 return True
38 43