From 2e747436a758d6847ef3122a1aa7cd5b94f1423c Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Wed, 27 May 2009 16:48:32 -0400 Subject: [PATCH] * ubuntutools/lp/libsupport.py: Fail if we're unable to import launchpadlib (we need it to run stuff). --- ubuntutools/lp/libsupport.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ubuntutools/lp/libsupport.py b/ubuntutools/lp/libsupport.py index e999d7b..319b713 100644 --- a/ubuntutools/lp/libsupport.py +++ b/ubuntutools/lp/libsupport.py @@ -21,14 +21,19 @@ # Modules. import glob import os +import sys import urllib import urlparse +import httplib2 + try: - import httplib2 from launchpadlib.credentials import Credentials from launchpadlib.launchpad import Launchpad, STAGING_SERVICE_ROOT, EDGE_SERVICE_ROOT from launchpadlib.errors import HTTPError except ImportError: + print "Unable to import launchpadlib module, is python-launchpadlib installed?" + sys.exit(1) +except: Credentials = None Launchpad = None