Skip to content

Commit

Permalink
chg: [hashlookup] enable the spinner by default and log on stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
adulau committed Dec 24, 2021
1 parent dd24a86 commit d6ce542
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/hashlookup-analyser.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
parser.add_argument(
"--progress",
action="store_true",
default=False,
default=True,
help="Pring progress of the file lookup on stderr.",
)
parser.add_argument("-d", "--dir", help="Directory to analyse")
Expand Down Expand Up @@ -128,8 +128,8 @@ def lookup(value=None):
if args.extended_debug:
print(f'file={fn}, mode={mode}, finfo={fn_info}')
if args.progress:
sys.stdout.write(next(spinner))
sys.stdout.write(
sys.stderr.write(next(spinner))
sys.stderr.write(
f' - Files analysed={stats["analysed"]}, excluded={stats["excluded"]}, unknown={stats["unknown"]}, found={stats["found"]}\r'
)
if stat.S_ISDIR(mode):
Expand Down

0 comments on commit d6ce542

Please sign in to comment.