server/sources/storages.py
changeset 8695 358d8bed9626
parent 8662 60a13447f389
child 8900 010a59e12d89
--- a/server/sources/storages.py	Thu Feb 14 15:39:23 2013 +0100
+++ b/server/sources/storages.py	Thu Feb 14 15:38:25 2013 +0100
@@ -144,7 +144,7 @@
         fpath = source.binary_to_str(value)
         try:
             return Binary.from_file(fpath)
-        except EnvironmentError, ex:
+        except EnvironmentError as ex:
             source.critical("can't open %s: %s", value, ex)
             return None
 
@@ -264,7 +264,7 @@
         for filepath in self.get_data():
             try:
                 unlink(filepath)
-            except Exception, ex:
+            except Exception as ex:
                 self.error('cant remove %s: %s' % (filepath, ex))
 
 class DeleteFileOp(hook.DataOperationMixIn, hook.Operation):
@@ -272,5 +272,5 @@
         for filepath in self.get_data():
             try:
                 unlink(filepath)
-            except Exception, ex:
+            except Exception as ex:
                 self.error('cant remove %s: %s' % (filepath, ex))