Projects
Kolab:16:Enterprise
pykolab
0001-Python-3-Use-0o-prefix-for-octal-numbers.p...
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Python-3-Use-0o-prefix-for-octal-numbers.patch of Package pykolab (Revision 61)
Currently displaying revision
61
,
Show latest
From 7750671314e6da19f65aaa95bb1095963fdc175a Mon Sep 17 00:00:00 2001 Message-Id: <7750671314e6da19f65aaa95bb1095963fdc175a.1643911242.git.kolab@sicherha.de> From: Christoph Erhardt <kolab@sicherha.de> Date: Fri, 4 Jun 2021 16:16:55 +0200 Subject: [PATCH] [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 --- pykolab/auth/ldap/syncrepl.py | 2 +- pykolab/logger.py | 2 +- pykolab/setup/setup_mta.py | 2 +- pykolab/setup/setup_mysql.py | 2 +- pykolab/setup/setup_roundcube.py | 2 +- pykolab/setup/setup_syncroton.py | 2 +- saslauthd/__init__.py | 2 +- 7 files changed, 7 insertions(+), 7 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() diff --git a/saslauthd/__init__.py b/saslauthd/__init__.py index 30e8189..e11296b 100644 --- a/saslauthd/__init__.py +++ b/saslauthd/__init__.py @@ -204,7 +204,7 @@ class SASLAuthDaemon(object): pass s.bind(conf.socketfile) - os.chmod(conf.socketfile, 0777) + os.chmod(conf.socketfile, 0o777) s.listen(5) -- 2.34.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.