-
Notifications
You must be signed in to change notification settings - Fork 106
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 for cron issues #613
Fix for cron issues #613
Conversation
This error was caused by trying to retrieve last version when no version was received
This will prevent issue with UnicodeEncodeError when running files/anitya_cron.py
Codecov Report
@@ Coverage Diff @@
## master #613 +/- ##
==========================================
+ Coverage 90.02% 90.03% +0.01%
==========================================
Files 55 55
Lines 2646 2650 +4
Branches 341 343 +2
==========================================
+ Hits 2382 2386 +4
Misses 201 201
Partials 63 63
Continue to review full report at Codecov.
|
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.
One small note about the string format
anitya/lib/backends/github.py
Outdated
'Project %s was incorrectly set-up. \ | ||
Can\'t parse owner and repo' % project.name) | ||
'Project %s was incorrectly set-up. ' % project.name + | ||
'Can\'t parse owner and repo.') |
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.
It's neater to do it as:
"Project {} was incorrectly set-up. Can't parse owner and repo.".format(project.name)
rather than having the format in the middle of a string
anitya/lib/backends/github.py
Outdated
'Project %s was incorrectly set-up. ' % project.name + | ||
'Can\'t parse owner and repo.') | ||
"""Project {} was incorrectly set-up. | ||
Can\'t parse owner and repo.""".format(project.name)) |
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.
FYI you can do
raise AnityaPluginException(
"..."
"more text".format())
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.
Didn't know that, it can't be done with %
.
This PR should fix current cron issues on staging.