summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorChristoph Erhardt <kolab@sicherha.de>2021-06-04 16:16:55 +0200
committerChristoph Erhardt <kolab@sicherha.de>2022-01-10 20:41:48 +0100
commit7750671314e6da19f65aaa95bb1095963fdc175a (patch)
tree66bbfff2131c61399ac5ee31c69b8d46f34afc64 /pykolab
parent25766ccf27109582d9b1531d17f9cd3973eb3eca (diff)
downloadpykolab-7750671314e6da19f65aaa95bb1095963fdc175a.tar.gz
[Python 3] Use 0o prefix for octal numbers
Summary: The new 0o prefix was introduced in Python 2.6; the old 0 prefix was deprecated in Python 3.0. Reviewers: machniak, mollekopf Reviewed By: mollekopf Subscribers: mollekopf Differential Revision: https://git.kolab.org/D3226
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/auth/ldap/syncrepl.py2
-rw-r--r--pykolab/logger.py2
-rw-r--r--pykolab/setup/setup_mta.py2
-rw-r--r--pykolab/setup/setup_mysql.py2
-rw-r--r--pykolab/setup/setup_roundcube.py2
-rw-r--r--pykolab/setup/setup_syncroton.py2
6 files changed, 6 insertions, 6 deletions
diff --git a/pykolab/auth/ldap/syncrepl.py b/pykolab/auth/ldap/syncrepl.py
index 03ab5ae..72f5f37 100644
--- a/pykolab/auth/ldap/syncrepl.py
+++ b/pykolab/auth/ldap/syncrepl.py
@@ -22,7 +22,7 @@ class DNSync(ldap.ldapobject.LDAPObject,ldap.syncrepl.SyncreplConsumer):
del kwargs['callback']
ldap.ldapobject.LDAPObject.__init__(self, *args, **kwargs)
- self.__db = anydbm.open(filename, 'c', 0640)
+ self.__db = anydbm.open(filename, 'c', 0o640)
self.__presentUUIDs = {}
def syncrepl_set_cookie(self,cookie):
diff --git a/pykolab/logger.py b/pykolab/logger.py
index c2237cb..8e9c9b6 100644
--- a/pykolab/logger.py
+++ b/pykolab/logger.py
@@ -213,7 +213,7 @@ class Logger(logging.Logger):
group_gid
)
- os.chmod(self.logfile, '0660')
+ os.chmod(self.logfile, 0o660)
except Exception as errmsg:
self.error(
diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
index c3c4154..903acd7 100644
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -243,7 +243,7 @@ result_format = "shared+%%s"
)
if not os.path.isdir('/etc/postfix/ldap'):
- os.mkdir('/etc/postfix/ldap/', 0770)
+ os.mkdir('/etc/postfix/ldap/', 0o770)
for filename in files.keys():
fp = open(filename, 'w')
diff --git a/pykolab/setup/setup_mysql.py b/pykolab/setup/setup_mysql.py
index 08b7b7c..73c2245 100644
--- a/pykolab/setup/setup_mysql.py
+++ b/pykolab/setup/setup_mysql.py
@@ -256,7 +256,7 @@ host=%s
fp = open('/tmp/kolab-setup-my.cnf', 'w')
- os.chmod('/tmp/kolab-setup-my.cnf', 0600)
+ os.chmod('/tmp/kolab-setup-my.cnf', 0o600)
fp.write(data)
fp.close()
diff --git a/pykolab/setup/setup_roundcube.py b/pykolab/setup/setup_roundcube.py
index 47ac8fc..869533f 100644
--- a/pykolab/setup/setup_roundcube.py
+++ b/pykolab/setup/setup_roundcube.py
@@ -259,7 +259,7 @@ host=%s
""" % (mysql_root_password, conf.mysqlhost)
fp = open('/tmp/kolab-setup-my.cnf', 'w')
- os.chmod('/tmp/kolab-setup-my.cnf', 0600)
+ os.chmod('/tmp/kolab-setup-my.cnf', 0o600)
fp.write(data)
fp.close()
diff --git a/pykolab/setup/setup_syncroton.py b/pykolab/setup/setup_syncroton.py
index c7c03ce..1cccd0e 100644
--- a/pykolab/setup/setup_syncroton.py
+++ b/pykolab/setup/setup_syncroton.py
@@ -109,7 +109,7 @@ host=%s
""" % (mysql_root_password, conf.mysqlhost)
fp = open('/tmp/kolab-setup-my.cnf', 'w')
- os.chmod('/tmp/kolab-setup-my.cnf', 0600)
+ os.chmod('/tmp/kolab-setup-my.cnf', 0o600)
fp.write(data)
fp.close()