Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mat2
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
atenart
mat2
Commits
f1a06e80
Commit
f1a06e80
authored
5 years ago
by
Julien (jvoisin) Voisin
Browse files
Options
Downloads
Patches
Plain Diff
Fix an erroneous errors message
This one was spotted by @fuzzy
parent
4f0e0685
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mat2
+6
-1
6 additions, 1 deletion
mat2
with
6 additions
and
1 deletion
mat2
+
6
−
1
View file @
f1a06e80
...
...
@@ -32,7 +32,12 @@ def __check_file(filename: str, mode: int = os.R_OK) -> bool:
print
(
"
[-] %s is not a regular file.
"
%
filename
)
return
False
elif
not
os
.
access
(
filename
,
mode
):
print
(
"
[-] %s is not readable and writeable.
"
%
filename
)
mode_str
=
[]
# type: List[str]
if
mode
&
os
.
R_OK
:
mode_str
+=
'
readable
'
if
mode
&
os
.
W_OK
:
mode_str
+=
'
writeable
'
print
(
"
[-] %s is not %s.
"
%
(
filename
,
'
nor
'
.
join
(
mode_str
)))
return
False
return
True
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment