serveronly: replace exc.message with str(exc)
authorArun Kulshreshtha <kulshrax@fb.com>
Thu, 09 Mar 2017 12:20:27 -0800
changeset 2071 8fbf75ca8a08
parent 2070 9105c3c54045
child 2072 c0a685c67c5c
serveronly: replace exc.message with str(exc) BaseException.message is deprecated in Python 2.6, so use str() instead.
hgext3rd/evolve/serveronly.py
--- a/hgext3rd/evolve/serveronly.py	Thu Mar 09 13:11:20 2017 -0800
+++ b/hgext3rd/evolve/serveronly.py	Thu Mar 09 12:20:27 2017 -0800
@@ -21,7 +21,7 @@
         obsexchange,
     )
 except ValueError as exc:
-    if exc.message != 'Attempted relative import in non-package':
+    if str(exc) != 'Attempted relative import in non-package':
         raise
     # extension imported using direct path
     sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))