From: Alfredo Deza Date: Fri, 25 Apr 2014 14:19:43 +0000 (-0400) Subject: support 2.5 in vendor.py X-Git-Tag: v1.5.0~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f876a9ba27e9d0578a0b4181792e82e5e5ce4f8e;p=ceph-deploy.git support 2.5 in vendor.py 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 --- diff --git a/vendor.py b/vendor.py index 7ce7f05..f10ee00 100644 --- 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)