mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Modernize number literals
Use Python-3 compatible syntax, without breaking compatibility with py 2.7 - Octals literals start with 0o to prevent confusion - The "L" at the end of large int literals is not required as they use long on Python 2 automatically. - Using 'int' instead of 'long' for small numbers is OK in all cases except strict type checking checking, e.g. type(0). https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
committed by
Jan Cholasta
parent
a908be2785
commit
b8c46f2a32
@@ -317,7 +317,7 @@ class KrbInstance(service.Service):
|
||||
def __add_default_acis(self):
|
||||
self._ldap_mod("default-aci.ldif", self.sub_dict)
|
||||
|
||||
def __template_file(self, path, chmod=0644):
|
||||
def __template_file(self, path, chmod=0o644):
|
||||
template = os.path.join(ipautil.SHARE_DIR, os.path.basename(path) + ".template")
|
||||
conf = ipautil.template_file(template, self.sub_dict)
|
||||
self.fstore.backup_file(path)
|
||||
@@ -399,7 +399,7 @@ class KrbInstance(service.Service):
|
||||
|
||||
# Make sure access is strictly reserved to root only for now
|
||||
os.chown(paths.KRB5_KEYTAB, 0, 0)
|
||||
os.chmod(paths.KRB5_KEYTAB, 0600)
|
||||
os.chmod(paths.KRB5_KEYTAB, 0o600)
|
||||
|
||||
self.move_service_to_host(host_principal)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user