commit 6cdaf30da64e9e12224fd0d93c90636d4020f957
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Fri Oct 18 17:43:53 2024 +0200
Update callback
callback_plugins/logdetail.py | 4 +-
callback_plugins/logdetail2.py | 278 ----------------------------------------
2 files changed, 2 insertions(+), 280 deletions(-)
---
diff --git a/callback_plugins/logdetail.py b/callback_plugins/logdetail.py
index 902ecad..21aa97c 100644
--- a/callback_plugins/logdetail.py
+++ b/callback_plugins/logdetail.py
@@ -60,7 +60,7 @@ MSG_FORMAT =
"%(now)s\t%(count)s\t%(category)s\t%(name)s\t%(data)s\n"
def getlogin():
try:
user = os.getlogin()
- except OSError as e:
+ except OSError:
user = pwd.getpwuid(os.geteuid())[0]
return user
@@ -75,7 +75,7 @@ class LogMech(object):
self.logpath = logpath
if not os.path.exists(self.logpath):
try:
- os.makedirs(self.logpath, mode=0750)
+ os.makedirs(self.logpath, mode=0o750)
except OSError as e:
if e.errno != 17:
raise
Show replies by date