Skip to content

Commit

Permalink
improved config.ini variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
ph1go committed Nov 1, 2021
1 parent 8274799 commit 0dfc085
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ url = localhost
port = 5052

[email]
from address =
from password =
to address =
from_address =
from_password =
to_address =
8 changes: 4 additions & 4 deletions constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

if not config_file.is_file():
cfg['beacon'] = {'url': 'localhost', 'port': '5052'}
cfg['email'] = {'from address': '', 'from password': '', 'to address': ''}
cfg['email'] = {'from_address': '', 'from_password': '', 'to_address': ''}

with config_file.open('w') as f:
cfg.write(f)
Expand All @@ -33,9 +33,9 @@

@dataclass
class EmailDetails:
from_addr: str = cfg['email'].get('from address')
from_pwd: str = cfg['email'].get('from password')
to_addr: str = cfg['email'].get('to address')
from_addr: str = cfg['email'].get('from_address')
from_pwd: str = cfg['email'].get('from_password')
to_addr: str = cfg['email'].get('to_address')

are_valid: bool = field(init=False)

Expand Down

0 comments on commit 0dfc085

Please sign in to comment.