mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 01:26:11 -08:00
BE: mylog() better code radability
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
@@ -295,9 +295,7 @@ class NotificationInstance:
|
||||
(f"-{minutes} minutes", tz_offset),
|
||||
)
|
||||
|
||||
mylog(
|
||||
"minimal", ["[Notification] Notifications changes: ", self.db.sql.rowcount]
|
||||
)
|
||||
mylog("minimal", ["[Notification] Notifications changes: ", self.db.sql.rowcount])
|
||||
|
||||
# clear plugin events
|
||||
self.clearPluginEvents()
|
||||
|
||||
@@ -31,10 +31,7 @@ class UserEventsQueueInstance:
|
||||
Returns an empty list if the file doesn't exist.
|
||||
"""
|
||||
if not os.path.exists(self.log_file):
|
||||
mylog(
|
||||
"none",
|
||||
["[UserEventsQueueInstance] Log file not found: ", self.log_file],
|
||||
)
|
||||
mylog("none", ["[UserEventsQueueInstance] Log file not found: ", self.log_file],)
|
||||
return [] # No log file, return empty list
|
||||
with open(self.log_file, "r") as file:
|
||||
return file.readlines()
|
||||
|
||||
Reference in New Issue
Block a user