From 6b484b7f4969818e096a863588c5ea6020441d32 Mon Sep 17 00:00:00 2001 From: mprahl Date: Wed, 11 Sep 2019 12:38:02 -0400 Subject: [PATCH] Use str(e) instead of e.message to support Python 2 and 3 --- module_build_service/scm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module_build_service/scm.py b/module_build_service/scm.py index c1bf534a..d46e1791 100644 --- a/module_build_service/scm.py +++ b/module_build_service/scm.py @@ -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