Skip to content

Commit

Permalink
Fixed lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
chughes741 committed Aug 5, 2023
1 parent 136b1e4 commit 9e6aa83
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions openct/setup/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Config file generator."""

import os
import sys

import yaml

Expand All @@ -10,9 +11,9 @@
user_input = input(
f"The config file '{CONFIG_FILE}' already exists. Do you want to overwrite it? (yes/no): "
).lower()
if user_input != "yes" and user_input != "y":
if user_input not in {"yes", "y"}:
print("Config file not overwritten. Exiting.")
exit()
sys.exit()

mt_backup_config = {
"identity": {
Expand All @@ -32,5 +33,5 @@
},
}

with open(file=CONFIG_FILE, mode="w", encoding="utf-8") as file:
with open(file="config.yml", mode="a", encoding="utf-8") as file:
yaml.dump(mt_backup_config, file, default_flow_style=False)

0 comments on commit 9e6aa83

Please sign in to comment.