* Amarok plays Killing me softly by Fugees.
When these things catches KeyboardInterrupts they eat and spit it.
This commit is contained in:
+3
-1
@@ -497,7 +497,9 @@ def rebuild_db(files=False):
|
||||
# check db schema versions
|
||||
try:
|
||||
pisi.lockeddbshelve.check_dbversion('filesdbversion', pisi.__filesdbversion__, write=False)
|
||||
except:
|
||||
except KeyboardInterrupt:
|
||||
raise
|
||||
except Exception, e: #FIXME: what exception could we catch here, replace with that.
|
||||
files = True # exception means the files db version was wrong
|
||||
pisi.lockeddbshelve.init_dbenv(write=True, writeversion=True)
|
||||
destroy(files) # bye bye
|
||||
|
||||
+3
-1
@@ -50,7 +50,9 @@ def wait_comar():
|
||||
else:
|
||||
sock.connect("/var/run/comar.socket")
|
||||
return True
|
||||
except:
|
||||
except KeyboardInterrupt:
|
||||
raise
|
||||
except Exception, e: #FIXME: what exception could we catch here, replace with that.
|
||||
timeout -= 0.2
|
||||
time.sleep(0.2)
|
||||
return False
|
||||
|
||||
+3
-1
@@ -203,7 +203,9 @@ class Fetcher:
|
||||
|
||||
try:
|
||||
total_size = int(headers['Content-Length']) + self.exist_size
|
||||
except:
|
||||
except KeyboardInterrupt:
|
||||
raise
|
||||
except Exception, e: #FIXME: what exception could we catch here, replace with that.
|
||||
total_size = 0
|
||||
|
||||
self._do_grab(fileObj, dest, total_size)
|
||||
|
||||
+3
-1
@@ -210,7 +210,9 @@ class File:
|
||||
if sign==File.detached:
|
||||
try:
|
||||
sigfilename = File.download(URI(uri + '.sig'), transfer_dir)
|
||||
except:
|
||||
except KeyboardInterrupt:
|
||||
raise
|
||||
except Exception, e: #FIXME: what exception could we catch here, replace with that.
|
||||
raise NoSignatureFound(uri)
|
||||
if os.system('gpg --verify ' + sigfilename) != 0:
|
||||
raise InvalidSignature(uri)
|
||||
|
||||
+3
-1
@@ -266,7 +266,9 @@ def is_upgradable(name, ignore_build = False):
|
||||
(version, release, build) = ctx.installdb.get_version(name)
|
||||
try:
|
||||
pkg = ctx.packagedb.get_package(name)
|
||||
except:
|
||||
except KeyboardInterrupt:
|
||||
raise
|
||||
except Exception, e: #FIXME: what exception could we catch here, replace with that.
|
||||
return False
|
||||
if ignore_build or (not build) or (not pkg.build):
|
||||
return Version(release) < Version(pkg.release)
|
||||
|
||||
@@ -106,7 +106,9 @@ class LocalText(dict):
|
||||
return 'en'
|
||||
else:
|
||||
return lang[0:2]
|
||||
except:
|
||||
except KeyboardInterrupt:
|
||||
raise
|
||||
except Exception, e: #FIXME: what exception could we catch here, replace with that.
|
||||
raise Error(_('LocalText: unable to get either current or default locale'))
|
||||
|
||||
def errors(self, where = unicode()):
|
||||
@@ -403,7 +405,9 @@ class autoxml(oo.autosuper, oo.autoprop):
|
||||
try:
|
||||
if getattr(self, name) != getattr(other, name):
|
||||
return False
|
||||
except:
|
||||
except KeyboardInterrupt:
|
||||
raise
|
||||
except Exception, e: #FIXME: what exception could we catch here, replace with that.
|
||||
return False
|
||||
return True
|
||||
def notequal(self, other):
|
||||
@@ -640,7 +644,9 @@ class autoxml(oo.autosuper, oo.autoprop):
|
||||
if text:
|
||||
try:
|
||||
value = autoxml.basic_cons_map[token_type](text)
|
||||
except:
|
||||
except KeyboardInterrupt:
|
||||
raise
|
||||
except Exception, e: #FIXME: what exception could we catch here, replace with that.
|
||||
value = None
|
||||
errs.append(where + ': ' + _('Type mismatch: read text cannot be decoded'))
|
||||
return value
|
||||
|
||||
+3
-1
@@ -458,7 +458,9 @@ def sha1_data(data):
|
||||
m = sha.new()
|
||||
m.update(data)
|
||||
return m.hexdigest()
|
||||
except:
|
||||
except KeyboardInterrupt:
|
||||
raise
|
||||
except Exception, e: #FIXME: what exception could we catch here, replace with that.
|
||||
raise Error(_("Cannot calculate SHA1 hash of given data"))
|
||||
|
||||
def uncompress(patchFile, compressType="gz", targetDir=None):
|
||||
|
||||
Reference in New Issue
Block a user