Fix lint
This commit is contained in:
parent
480e222d6d
commit
8f58d22ad7
@ -54,7 +54,7 @@ def elide(text, length):
|
||||
if len(text) <= length:
|
||||
return text
|
||||
else:
|
||||
return text[:length-1] + '\u2026'
|
||||
return text[:length - 1] + '\u2026'
|
||||
|
||||
|
||||
def check_overflow(arg, ctype, fatal=True):
|
||||
|
@ -36,11 +36,11 @@ def remove(path):
|
||||
"""Remove either a file or directory unless --dry-run is given."""
|
||||
if os.path.isdir(path):
|
||||
print("rm -r '{}'".format(path))
|
||||
if not '--dry-run' in sys.argv:
|
||||
if '--dry-run' not in sys.argv:
|
||||
shutil.rmtree(path)
|
||||
else:
|
||||
print("rm '{}'".format(path))
|
||||
if not '--dry-run' in sys.argv:
|
||||
if '--dry-run' not in sys.argv:
|
||||
os.remove(path)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user