diff web/atomicfile.py @ 586:87c20b8c5472 default master

port to python3
author Matt Johnston <matt@ucc.asn.au>
date Mon, 09 Sep 2019 22:24:10 +0800
parents 6dd157a12035
children
line wrap: on
line diff
--- a/web/atomicfile.py	Mon Sep 09 22:23:45 2019 +0800
+++ b/web/atomicfile.py	Mon Sep 09 22:24:10 2019 +0800
@@ -23,8 +23,8 @@
                     f.write(data)
                     return True
 
-        except IOError, e:
-            print>>sys.stderr, e
+        except IOError as e:
+            print(e, file=sys.stderr)
 
         return False
 
@@ -41,7 +41,7 @@
 
                     return f.read()
 
-        except IOError, e:
-            print>>sys.stderr, e
+        except IOError as e:
+            print(e, file=sys.stderr)
 
         return None