]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
support 2.5 in vendor.py
authorAlfredo Deza <alfredo.deza@inktank.com>
Fri, 25 Apr 2014 14:19:43 +0000 (10:19 -0400)
committerAlfredo Deza <alfredo.deza@inktank.com>
Fri, 25 Apr 2014 14:19:43 +0000 (10:19 -0400)
Even though we do not support it at all, some build servers
are attemtping to package ceph-deploy with that Python version. It
doesn't hurt to make it compatible

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
vendor.py

index 7ce7f0589916a65685136abefb4d81a858e553c3..f10ee0006d399e53329c61141ba9889c257f6ee0 100644 (file)
--- a/vendor.py
+++ b/vendor.py
@@ -2,6 +2,7 @@ import subprocess
 import os
 from os import path
 import traceback
+import sys
 
 
 error_msg = """
@@ -20,7 +21,9 @@ def run(cmd):
             stderr=subprocess.PIPE,
             stdout=subprocess.PIPE
         )
-    except Exception as error:
+    except Exception:
+        # if building with python2.5 this makes it compatible
+        _, error, _ = sys.exc_info()
         print_error([], traceback.format_exc(error).split('\n'))
         raise SystemExit(1)