Skip to content

Commit

Permalink
irclogs.py: Fix syntax errors
Browse files Browse the repository at this point in the history
- renamed variable `source` to `source_dir`
- use `{}` as format() placeholder
  • Loading branch information
dregad committed Apr 4, 2021
1 parent 551846f commit f74dbac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions irclogs.py
Expand Up @@ -15,7 +15,7 @@
# ---------------------------------------------------------------------

# Directory where ChannelLogger stores the raw IRC logs
source = '/home/supybot/mantisbot/logs/ChannelLogger'
source_dir = '/home/supybot/mantisbot/logs/ChannelLogger'

# Web server directory from which the html pages are served
target_dir = '/srv/www/irclogs'
Expand All @@ -30,7 +30,7 @@ def log(msg):
"""
Prints log message with timestamp
"""
print("%s %s".format(
print("{} {}".format(
datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'),
msg
))
Expand Down

0 comments on commit f74dbac

Please sign in to comment.