summaryrefslogtreecommitdiff
path: root/UpdateManager
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-04-03 17:49:38 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-04-03 17:49:38 +0200
commit672afa8a5ebd29d89492cdb36a34cd791a3f4ada (patch)
treed58202ed32b42a647f048cf7ac99531c83ad7e29 /UpdateManager
parentf6ebff3d202238ae73942212b97096535c63b5e1 (diff)
downloadpython-apt-672afa8a5ebd29d89492cdb36a34cd791a3f4ada.tar.gz
* when runing gpg, protect it with try: except:
Diffstat (limited to 'UpdateManager')
-rw-r--r--UpdateManager/DistUpgradeFetcher.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/UpdateManager/DistUpgradeFetcher.py b/UpdateManager/DistUpgradeFetcher.py
index c6b83994..794566c2 100644
--- a/UpdateManager/DistUpgradeFetcher.py
+++ b/UpdateManager/DistUpgradeFetcher.py
@@ -114,7 +114,11 @@ class DistUpgradeFetcher(object):
proc = gpg.run(['--verify', signature, file],
create_fhs=['status','logger','stderr'])
gpgres = proc.handles['status'].read()
- proc.wait()
+ try:
+ proc.wait()
+ except IOError:
+ # gnupg returned a problem (non-zero exit)
+ return False
if "VALIDSIG" in gpgres:
return True
return False