]> git.phdru.name Git - m_lib.git/blobdiff - m_lib/hash/ZODBhash.py
Fix octals (066 => 0o666) for Py3 compatibility
[m_lib.git] / m_lib / hash / ZODBhash.py
index 13073c5a52c3e5d0cbeb7626ce231455cd4a91d5..61a1bee69780ad957333f56a1bfa4edc75fe6c91 100644 (file)
@@ -1,8 +1,4 @@
-"""Provide a (g)dbm-compatible interface to ZODB.
-Author: Oleg Broytman <phd@phd.pp.ru>
-Copyright (C) 2001-2002 PhiloSoft Design
-License: Python"""
-
+"""(g)dbm-compatible interface to ZODB"""
 
 import sys
 try:
@@ -19,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 
 
@@ -77,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)