-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update_signatures.py: add CLI options, new debug option #102
update_signatures.py: add CLI options, new debug option #102
Conversation
a81f2ce
to
de0e404
Compare
This is useful for debugging.
dd1271a
to
3e3cc2d
Compare
It turned out we were importing and calling the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Being able to troubleshoot update signatures without having to re-download every file seems very convenient.
fido/update_signatures.py
Outdated
parser.add_argument('-http_throttle', default=options['http_throttle'], help='Time (in seconds) to wait between downloads', type=float, dest='http_throttle') | ||
args = parser.parse_args() | ||
opts = defaults.copy() | ||
opts.update(args.__dict__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think vars(args)
is more appropriate here. It accesses the namespace's dict, but without using a __ function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated!
3e3cc2d
to
05f4508
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is working. Nice additions, thank you!
For debugging, I find it really useful to be able to control several of the defaults used by
update_signatures
. I also find it really useful to be able to disable deleting the temporary directory. I was debugging a bug that happens between downloading files and running the steps in theprepare
module, which also happens to be where the temp files get deleted - a lesson I learned the hard way!