Changeset View
Changeset View
Standalone View
Standalone View
pykolab/logger.py
Show First 20 Lines • Show All 207 Lines • ▼ Show 20 Lines | def __init__(self, *args, **kw): | ||||
try: | try: | ||||
if user_uid > 0 or group_gid > 0: | if user_uid > 0 or group_gid > 0: | ||||
os.chown( | os.chown( | ||||
self.logfile, | self.logfile, | ||||
user_uid, | user_uid, | ||||
group_gid | group_gid | ||||
) | ) | ||||
os.chmod(self.logfile, '0660') | os.chmod(self.logfile, 0o660) | ||||
except Exception as errmsg: | except Exception as errmsg: | ||||
self.error( | self.error( | ||||
_("Could not change permissions on %s: %r") % (self.logfile, errmsg) | _("Could not change permissions on %s: %r") % (self.logfile, errmsg) | ||||
) | ) | ||||
if self.debuglevel > 8: | if self.debuglevel > 8: | ||||
import traceback | import traceback | ||||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |