mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-14 02:11:29 +00:00
* ubuntutools/lp/libsupport.py: Fail if we're unable to import launchpadlib
(we need it to run stuff).
This commit is contained in:
parent
d131a9d995
commit
2e747436a7
@ -21,14 +21,19 @@
|
|||||||
# Modules.
|
# Modules.
|
||||||
import glob
|
import glob
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import urllib
|
import urllib
|
||||||
import urlparse
|
import urlparse
|
||||||
|
import httplib2
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import httplib2
|
|
||||||
from launchpadlib.credentials import Credentials
|
from launchpadlib.credentials import Credentials
|
||||||
from launchpadlib.launchpad import Launchpad, STAGING_SERVICE_ROOT, EDGE_SERVICE_ROOT
|
from launchpadlib.launchpad import Launchpad, STAGING_SERVICE_ROOT, EDGE_SERVICE_ROOT
|
||||||
from launchpadlib.errors import HTTPError
|
from launchpadlib.errors import HTTPError
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
print "Unable to import launchpadlib module, is python-launchpadlib installed?"
|
||||||
|
sys.exit(1)
|
||||||
|
except:
|
||||||
Credentials = None
|
Credentials = None
|
||||||
Launchpad = None
|
Launchpad = None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user