Skip to content

Commit

Permalink
Linter and typos fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
filipdjokic committed Dec 10, 2024
1 parent d379fce commit 347c8cb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions installer/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1119,11 +1119,11 @@ def setup_journal_logging(self) -> bool:
else:
logging.debug("Default configuration doesn't need to be removed. Skipping...")

logging.info(f"Configuring journald configuration for logging")
logging.info("Configuring journald configuration for logging")

# Modify journald template file with values specific to the installation
with open(DEFAULT_JOURNAL_CONFIG_FILE, "w") as fname:
if is_valid_url(DEFAULT_JOURNAL_CONFIG_FILE):
if is_valid_url(JOURNAL_TEMPLATE):
with request.urlopen(JOURNAL_TEMPLATE) as response, open(DEFAULT_JOURNAL_CONFIG_FILE, "w") as file:
file.write(response.read().decode("utf-8").strip())

Expand All @@ -1137,13 +1137,13 @@ def setup_journal_logging(self) -> bool:
if os.path.exists(DEFAULT_RSYSLOG_FILE):
logging.warning("Removing existing rsyslog configuration as requested")
self.remove_safe(DEFAULT_RSYSLOG_FILE)
else:
else:
logging.debug("Default configuration doesn't need to be removed. Skipping...")

if os.path.exists(DEFAULT_LOGROTATE_FILE):
logging.warning("Removing existing logrotate configuration as requested")
self.remove_safe(DEFAULT_LOGROTATE_FILE)
else:
else:
logging.debug("Default configuration doesn't need to be removed. Skipping...")
# Return True if both rsyslog and logrotate services are configured
return True
Expand Down Expand Up @@ -2188,9 +2188,9 @@ def ask_for_rewrite_journal(self):
try:
answer = self.ask("Overwrite existing configuration for cheqd-node logging, including the journald configuration file? (yes/no)", default="yes")
if answer.lower().startswith("y"):
self.rewrite_rsyslog = True
self.rewrite_journal = True
elif answer.lower().startswith("n"):
self.rewrite_rsyslog = False
self.rewrite_journal = False
else:
logging.error("Please choose either 'yes' or 'no'\n")
self.ask_for_rewrite_journal()
Expand Down

0 comments on commit 347c8cb

Please # to comment.