* ubuntutools/lp/libsupport.py: Fail if we're unable to import launchpadlib

(we need it to run stuff).
This commit is contained in:
Jonathan Davies 2009-05-27 16:48:32 -04:00
parent d131a9d995
commit 2e747436a7

View File

@ -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