Skip to content

Commit

Permalink
Resolved #1
Browse files Browse the repository at this point in the history
  • Loading branch information
redstonedesigner committed Sep 20, 2020
1 parent 98ab17b commit 50236a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ class Config:
def __init__(self):
try:
# Load valid config
cfg = yaml.load(open('config.yml','r'),Loader=yaml.CLoader)
cfg = yaml.load(open('config.yml','r'),Loader=yaml.Loader)
self.charset = cfg['charset']
self.format = cfg['format']
except Exception:
except Exception as e:
print(str(e))
# Handle invalid config
print(Back.RED+' ERROR '+Back.RESET+' Invalid configuration file. Regenerating...')
# Generate valid config
Expand Down
2 changes: 1 addition & 1 deletion config.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
charset: '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
format: '####-####-####-####'
format: '####-####-####-####'

0 comments on commit 50236a3

Please sign in to comment.