Browse Source

Oh, pylint!

merge-requests/1/head
Kirk Strauser 5 years ago
parent
commit
1816030f09
  1. 10
      toot_bot.py

10
toot_bot.py

@ -220,7 +220,7 @@ def handle_command_line():
# Ensure client_cred_file path is valid
client_cred_file = pathlib.Path(config['config']['client_cred_file'])
if not client_cred_file.parent.exists():
if not client_cred_file.parent.exists(): # pylint: disable=no-member
sys.exit('client_cred_file directory does not exist')
# Warn user that the config file WILL be created
if not client_cred_file.exists():
@ -228,7 +228,7 @@ def handle_command_line():
# Ensure user_cred_file path is valid
user_cred_file = pathlib.Path(config['config']['client_cred_file'])
if not user_cred_file.parent.exists():
if not user_cred_file.parent.exists(): # pylint: disable=no-member
sys.exit('user_cred_file directory does not exist')
if not user_cred_file.exists():
print('warning: user_cred file will be created')
@ -245,7 +245,7 @@ def handle_command_line():
if args.command == 'curation':
# Verify toot cache file folder exists
cache_file = pathlib.Path(config['curation']['cache_file'])
if not cache_file.parent.exists():
if not cache_file.parent.exists(): # pylint: disable=no-member
# Warn if curation cache file doesn't exist
sys.exit('curation cache_file directory does not exist')
if not cache_file.exists():
@ -256,7 +256,7 @@ def handle_command_line():
if args.command == 'welcome':
# Verify toot cache file folder exists
cache_file = pathlib.Path(config['welcome']['cache_file'])
if not cache_file.parent.exists():
if not cache_file.parent.exists(): # pylint: disable=no-member
# Warn if welcome cache file doesn't exist
sys.exit('welcome cache_file directory does not exist')
if not cache_file.exists():
@ -286,7 +286,7 @@ def handle_command_line():
# Deal with rss command
if args.command == 'rss':
cache_file = pathlib.Path(config['rss']['cache_file'])
if not cache_file.parent.exists():
if not cache_file.parent.exists(): # pylint: disable=no-member
# Warn if RSS cache file doesn't exist
sys.exit('rss cache_file directory does not exist')
if not cache_file.exists():

Loading…
Cancel
Save