Replace old except syntax with new one
Drops Python 2.5 support
This commit is contained in:
parent
ad72ca5c4c
commit
b3520665d7
@ -91,7 +91,7 @@ def freeze_export(export, result=None):
|
||||
serializer_cls = get_serializer(export)
|
||||
serializer = serializer_cls(export, query)
|
||||
serializer.serialize()
|
||||
except ProgrammingError, pe:
|
||||
except ProgrammingError as pe:
|
||||
raise FreezeException("Invalid query: %s" % pe)
|
||||
|
||||
|
||||
@ -110,7 +110,7 @@ def main():
|
||||
continue
|
||||
log.info("Running: %s", export.name)
|
||||
freeze_export(export)
|
||||
except FreezeException, fe:
|
||||
except FreezeException as fe:
|
||||
log.error(fe)
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@ -31,10 +31,10 @@ class Configuration(object):
|
||||
fh = open(file_name, 'rb')
|
||||
try:
|
||||
self.data = loader.load(fh)
|
||||
except ValueError, ve:
|
||||
except ValueError as ve:
|
||||
raise FreezeException("Invalid freeze file: %s" % ve)
|
||||
fh.close()
|
||||
except IOError, ioe:
|
||||
except IOError as ioe:
|
||||
raise FreezeException(unicode(ioe))
|
||||
|
||||
@property
|
||||
|
||||
Loading…
Reference in New Issue
Block a user