mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-10 06:09:32 +08:00
Use str(e) instead of e.message to support Python 2 and 3
This commit is contained in:
@@ -205,12 +205,12 @@ class SCM(object):
|
||||
self.checkout_ref(self.commit)
|
||||
except UnprocessableEntity as e:
|
||||
if (
|
||||
e.message.endswith(' did not match any file(s) known to git.\\n"')
|
||||
or "fatal: reference is not a tree: " in e.message
|
||||
str(e).endswith(' did not match any file(s) known to git.\\n"')
|
||||
or "fatal: reference is not a tree: " in str(e)
|
||||
):
|
||||
raise UnprocessableEntity(
|
||||
"checkout: The requested commit hash was not found within the repository. "
|
||||
"Perhaps you forgot to push. The original message was: %s" % e.message
|
||||
"Perhaps you forgot to push. The original message was: %s" % str(e)
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
Reference in New Issue
Block a user