Browse Source

Make room_path local because not used elsewhere

master
Luke Murphy 3 years ago
parent
commit
a38515ab10
No known key found for this signature in database GPG Key ID: 5E2EF5A63E3718CC
  1. 10
      LogBot/logbot.py

10
LogBot/logbot.py

@ -155,8 +155,8 @@ logbot @uptime: To check how long @logbot has been around
for room in self.rooms:
roomname = str(re.match(r".*@", room).group()).replace("@", "")
self.room_path = os.path.join(self.output, roomname)
self.log.info(f"Room path is set to: { self.room_path }")
room_path = os.path.join(self.output, roomname)
self.log.info(f"Processing setup logic for: {room_path}")
# Check if the room is in the database already
if not room in self.db.keys():
@ -166,9 +166,9 @@ logbot @uptime: To check how long @logbot has been around
self.log.info(f"Added to the database: { room }")
# Check if the room has an output folder already
if not os.path.exists(self.room_path):
os.mkdir(self.room_path)
shutil.copy("stylesheet.css", self.room_path)
if not os.path.exists(room_path):
os.mkdir(room_path)
shutil.copy("stylesheet.css", room_path)
self.log.info(f"Created a folder for: { room }")
self.log.info(f"Copied stylesheet.css to: { room }")

Loading…
Cancel
Save