mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
Trap an exception and fix some strings.
This commit is contained in:
parent
03e3d66c30
commit
6009e9d41b
13
common.py
13
common.py
@ -92,7 +92,7 @@ def checkSourceExists(package, release):
|
|||||||
m = re.search('"/ubuntu/%s/\+source/%s/(\d[^"]+)"' % (release,
|
m = re.search('"/ubuntu/%s/\+source/%s/(\d[^"]+)"' % (release,
|
||||||
package.replace('+', '\+')), page)
|
package.replace('+', '\+')), page)
|
||||||
if not m:
|
if not m:
|
||||||
print >> sys.stderr, "Unable to find this source package '%s' in " \
|
print >> sys.stderr, "Unable to find source package '%s' in " \
|
||||||
"the %s release." % (package, release.capitalize())
|
"the %s release." % (package, release.capitalize())
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ def prepareLaunchpadCookie():
|
|||||||
if launchpad_cookiefile != None:
|
if launchpad_cookiefile != None:
|
||||||
break
|
break
|
||||||
|
|
||||||
# Unable to find an correct file.
|
# Unable to find a correct file.
|
||||||
if launchpad_cookiefile == None:
|
if launchpad_cookiefile == None:
|
||||||
print >> sys.stderr, "Could not find cookie file for Launchpad. "
|
print >> sys.stderr, "Could not find cookie file for Launchpad. "
|
||||||
print >> sys.stderr, "Looked in: %s" % ", ".join(try_globs)
|
print >> sys.stderr, "Looked in: %s" % ", ".join(try_globs)
|
||||||
@ -152,13 +152,16 @@ def prepareLaunchpadCookie():
|
|||||||
|
|
||||||
def _check_for_launchpad_cookie(cookie_file):
|
def _check_for_launchpad_cookie(cookie_file):
|
||||||
# Found SQLite file? Parse information from it.
|
# Found SQLite file? Parse information from it.
|
||||||
if cookie_file.find('cookies.sqlite') != -1:
|
if 'cookies.sqlite' in cookie_file.find():
|
||||||
import sqlite3 as sqlite
|
import sqlite3 as sqlite
|
||||||
|
|
||||||
con = sqlite.connect(cookie_file)
|
con = sqlite.connect(cookie_file)
|
||||||
|
|
||||||
cur = con.cursor()
|
cur = con.cursor()
|
||||||
cur.execute("select host, path, isSecure, expiry, name, value from moz_cookies where host like ?", ['%%launchpad%%'])
|
try:
|
||||||
|
cur.execute("select host, path, isSecure, expiry, name, value from moz_cookies where host like ?", ['%%launchpad%%'])
|
||||||
|
except sqlite.OperationalError:
|
||||||
|
print 'Warning: Database "%s" is locked; ignoring it.' % cookie_file
|
||||||
|
return None
|
||||||
|
|
||||||
# No matching cookies? Abort.
|
# No matching cookies? Abort.
|
||||||
items = cur.fetchall()
|
items = cur.fetchall()
|
||||||
|
8
debian/changelog
vendored
8
debian/changelog
vendored
@ -1,3 +1,11 @@
|
|||||||
|
ubuntu-dev-tools (0.45ubuntu1) intrepid; urgency=low
|
||||||
|
|
||||||
|
* common.py:
|
||||||
|
- Trying to read from a locked sqlite cookie database isn't a fatal
|
||||||
|
error anymore.
|
||||||
|
|
||||||
|
-- Siegfried-Angel Gevatter Pujals <rainct@ubuntu.com> Sat, 06 Sep 2008 15:46:55 +0200
|
||||||
|
|
||||||
ubuntu-dev-tools (0.44ubuntu1) intrepid; urgency=low
|
ubuntu-dev-tools (0.44ubuntu1) intrepid; urgency=low
|
||||||
|
|
||||||
* Bazaar revision 203.
|
* Bazaar revision 203.
|
||||||
|
4
debian/control
vendored
4
debian/control
vendored
@ -25,5 +25,5 @@ Description: useful tools for Ubuntu developers
|
|||||||
This is a collection of useful tools that Ubuntu developers use to make their
|
This is a collection of useful tools that Ubuntu developers use to make their
|
||||||
packaging work a lot easier.
|
packaging work a lot easier.
|
||||||
.
|
.
|
||||||
Such tools can include bug filing, build rebuilding, packaging preparation,
|
Such tools can include bug filing, build rebuilding, packaging preparation
|
||||||
package analysis, among other things.
|
and package analysis, among other things.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user