aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek.chauhan@gmail.com>2009-02-24 20:47:42 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2009-02-24 20:47:42 +0530
commit2cfa0c6a7ceb997de860958157c6bab90f5b6138 (patch)
tree528ad667cd3805e248876eab40a5b4c1e0367f01
parentLet people edit the current status of master-install manually (diff)
downloadautotua-master.tar.gz
autotua-master.tar.bz2
autotua-master.zip
Explicitely use tuples for except:HEADmaster
This behaviour will change in Python 3.0, so we should make sure it's explicit right now.
-rw-r--r--master/master/slave_api.py2
-rw-r--r--slave/autotua/config.py2
-rw-r--r--slave/autotua/crypt/__init__.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/master/master/slave_api.py b/master/master/slave_api.py
index c1d750d..ea7cc8a 100644
--- a/master/master/slave_api.py
+++ b/master/master/slave_api.py
@@ -71,7 +71,7 @@ def get_pubkey(request):
pubkey_file = '%s/autotua_master.asc' % const.GPGHOME
try:
pubkey = open(pubkey_file)
- except IOError, OSError:
+ except (IOError, OSError):
crypto = crypt.Crypto(gpghome=const.GPGHOME)
crypto.export_pubkey(pubkey_file, 'AutotuA Master')
pubkey = open(pubkey_file)
diff --git a/slave/autotua/config.py b/slave/autotua/config.py
index 704a310..a168e52 100644
--- a/slave/autotua/config.py
+++ b/slave/autotua/config.py
@@ -47,7 +47,7 @@ try:
exec('%s = %s' % (option, cfg.getboolean('global', option.lower())))
elif isinstance(value, int):
exec('%s = %s' % (option, cfg.getint('global', option.lower())))
-except IOError, OSError:
+except (IOError, OSError):
print "!!! Unable to read %s/slave.cfg, ignoring..." % const.CONFIG_PATH
if not AUTOTUA_MASTER:
diff --git a/slave/autotua/crypt/__init__.py b/slave/autotua/crypt/__init__.py
index 0ee5073..b4600ad 100644
--- a/slave/autotua/crypt/__init__.py
+++ b/slave/autotua/crypt/__init__.py
@@ -24,7 +24,7 @@ class Crypto(object):
def _validate_gpghome(self):
try:
gpghome = open(self.gpghome+'/secring.gpg')
- except IOError, OSError:
+ except (IOError, OSError):
raise Exception('"%s": Unable to use GPG homedir' % self.gpghome)
finally:
gpghome.close()