-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fix "unexpected keyword argument 'filename'" #5
Conversation
This is a fix for the error above when syncing a remote repository whose packages have been updated compared to an already synced local copy.
self.callback('download_start', _file, url, basename, size, text) | ||
if basename: | ||
self.package = basename | ||
self.callback('download_start', filename, url, basename, size, text) |
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.
Should the callback depend on the basename being set? I'm not sure what the cases are where it wouldn't be.
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.
Sorry, this was another fix that would happen after the parameter name fix. By setting the defaults to None
, it allows both yum and urlgrabber to call this function. We have to set those defaults to None
because the call from drpm.py
does not pass basename. If drpm.py calls this and we don't check if basename exists, we would set self.package
to None
. It's possible that there would never be an issue, but I added this check just in case so we don't ever step on an existing download. If that happened, when end
gets called it would not know what package it was referencing.
@jrwesolo wow it's been a while since I've seen this code - Thanks for doing this! Just left one question but otherwise LGTM. |
Replied above to your question. Thanks for taking a look! |
Thanks! |
Fix "unexpected keyword argument 'filename'"
fix for TypeError: start() got an unexpected keyword argument "filename"
Yum was calling the start function of
pakrat/progress.py
with incorrect parameters. #3