]> git.phdru.name Git - m_lib.git/commitdiff
Fix octals (066 => 0o666) for Py3 compatibility
authorOleg Broytman <phd@phdru.name>
Mon, 25 Jul 2016 16:05:26 +0000 (19:05 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 25 Jul 2016 16:23:18 +0000 (19:23 +0300)
m_lib/hash/MKhash.py
m_lib/hash/ZODBhash.py

index d11a701e316005d291e0cc9dc25eef454238a0cd..83590e56eda879009f8bceddd81b512a9fd8b9ee 100644 (file)
@@ -15,7 +15,7 @@ error = ValueError
 
 
 class MKhash:
-    def __init__(self, file, flag, mode=0666, trans_threshold=1000):
+    def __init__(self, file, flag, mode=0o666, trans_threshold=1000):
         self.read_only = 0
         self._closed = 0
 
@@ -90,5 +90,5 @@ class MKhash:
             self.db.commit()
 
 
-def open(file, flag, mode=0666):
+def open(file, flag, mode=0o666):
     return MKhash(file, flag, mode)
index fb1361d19ae00ec5e02ad9cabbec8c4615baa6fe..61a1bee69780ad957333f56a1bfa4edc75fe6c91 100644 (file)
@@ -15,7 +15,7 @@ error = POSException.POSError                     # Exported for anydbm
 
 
 class ZODBhash:
-    def __init__(self, file, flag, mode=0666, trans_threshold=1000):
+    def __init__(self, file, flag, mode=0o666, trans_threshold=1000):
         create = (flag == 'n') # force recreation
         # if flag == 'w' or 'c' and file does not exist FileStorage will set it to 1 for us 
 
@@ -73,5 +73,5 @@ class ZODBhash:
             get_transaction().commit()
 
 
-def open(file, flag, mode=0666):
+def open(file, flag, mode=0o666):
     return ZODBhash(file, flag, mode)