[file_utils] fix python shebang & run prospector
prospector is still complaining about bare excepts in unln.py.
This commit is contained in:
parent
73916dc3f3
commit
9ba0a794aa
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/env python3
|
||||||
#
|
#
|
||||||
# dirpacker.py, Copyright © 2014 Matteo Cypriani <mcy@lm7.fr>
|
# dirpacker.py, Copyright © 2014 Matteo Cypriani <mcy@lm7.fr>
|
||||||
#
|
#
|
||||||
|
@ -119,7 +119,7 @@ def create_bin(binnumber):
|
||||||
files[sizes[size].pop()] = size
|
files[sizes[size].pop()] = size
|
||||||
# Delete the size from the dictionary if its last file name was just
|
# Delete the size from the dictionary if its last file name was just
|
||||||
# popped:
|
# popped:
|
||||||
if not len(sizes[size]):
|
if not sizes[size]:
|
||||||
del sizes[size]
|
del sizes[size]
|
||||||
|
|
||||||
binsize = newbinsize
|
binsize = newbinsize
|
||||||
|
@ -194,7 +194,7 @@ if options.verbose:
|
||||||
bins = []
|
bins = []
|
||||||
binnumber = options.first_bin_number
|
binnumber = options.first_bin_number
|
||||||
binscreated = 0
|
binscreated = 0
|
||||||
while len(sizes):
|
while sizes:
|
||||||
bins.append(create_bin(binnumber))
|
bins.append(create_bin(binnumber))
|
||||||
binnumber += 1
|
binnumber += 1
|
||||||
binscreated += 1
|
binscreated += 1
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/env python3
|
||||||
#
|
#
|
||||||
# unln.py, Copyright © 2013 Matteo Cypriani <mcy@lm7.fr>
|
# unln.py, Copyright © 2013 Matteo Cypriani <mcy@lm7.fr>
|
||||||
#
|
#
|
||||||
|
@ -177,6 +177,6 @@ for filename in options.filenames:
|
||||||
|
|
||||||
|
|
||||||
# Display the list of files in error
|
# Display the list of files in error
|
||||||
if len(error_filenames):
|
if error_filenames:
|
||||||
warn("The following regular files still have more than one hard link:")
|
warn("The following regular files still have more than one hard link:")
|
||||||
print(*error_filenames, sep="\n", file=sys.stderr)
|
print(*error_filenames, sep="\n", file=sys.stderr)
|
||||||
|
|
Loading…
Reference in New Issue