Skip to content
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

Merged
merged 3 commits into from
Sep 20, 2018
Merged

Fix for cron issues #613

merged 3 commits into from
Sep 20, 2018

Conversation

Zlopez
Copy link
Contributor

@Zlopez Zlopez commented Sep 20, 2018

This PR should fix current cron issues on staging.

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-io
Copy link

codecov-io commented Sep 20, 2018

Codecov Report

Merging #613 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
anitya/lib/backends/github.py 100% <100%> (ø) ⬆️
anitya/lib/backends/gitlab.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8f73430...709073e. Read the comment docs.

Copy link
Member

@jeremycline jeremycline left a 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

'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.')
Copy link
Member

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

'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))
Copy link
Member

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())

Copy link
Contributor Author

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 %.

@mergify mergify bot merged commit 01d8d5e into fedora-infra:master Sep 20, 2018
@Zlopez Zlopez deleted the cron branch October 8, 2018 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants