-
Notifications
You must be signed in to change notification settings - Fork 197
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
Execute skipped tests for Python 3 #2514
Conversation
bodhi/server/consumers/masher.py
Outdated
@@ -1302,7 +1302,7 @@ def _wait_for_sync(self): | |||
master_repomd_url = self._get_master_repomd_url(arch) | |||
|
|||
with open(repomd) as repomdf: | |||
checksum = hashlib.sha1(repomdf.read()).hexdigest() | |||
checksum = hashlib.sha1(str(repomdf.read()).encode('utf-8')).hexdigest() |
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.
You should not need the call to str()
here:
$ python3
>>> import hashlib
>>> with open('bodhi/server/__init__.py') as tf:
... hashlib.sha1(tf.read().encode('utf-8')).hexdigest()
...
'56ee127f54c7fcf7453817d257106747cfa9b461'
bodhi/server/consumers/masher.py
Outdated
@@ -1311,7 +1311,7 @@ def _wait_for_sync(self): | |||
self.log.exception('Error fetching repomd.xml') | |||
time.sleep(200) | |||
continue | |||
newsum = hashlib.sha1(masterrepomd.read()).hexdigest() | |||
newsum = hashlib.sha1(str(masterrepomd.read()).encode('utf-8')).hexdigest() |
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.
Same here.
Signed-off-by: Vismay Golwala <[email protected]>
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.
The tests pass everywhere except Rawhide, and that failure is a failure in Rawhide itself, so I'll just wait for that to get fixed and then we can merge this. It'll probably be at least a day or two before that gets fixed.
This patch is planned to be included in the upcoming 3.10.0 release: #2556. |
Signed-off-by: Vismay Golwala [email protected]