Add --config option for explicitly stating configuration file to use.

aliparlakci/bulk-downloader-for-reddit#122

Address comments in pull review.

* Removed vertical space.
* Added config file existence check with log message.
This commit is contained in:
Robert Pufky
2020-06-07 13:01:26 -07:00
parent 2ba763e03b
commit 37a3d83725
3 changed files with 34 additions and 13 deletions

View File

@@ -153,9 +153,15 @@ class Arguments:
action="store_true",
help="Just saved posts into a the POSTS.json file without downloading"
)
parser.add_argument("--config","-c",
help="Specify exact config.json file to use. " \
"Disables reading from 'Bulk downloader for " \
"reddit/config.json' and --use-local-config " \
"option."
)
if arguments == []:
return parser.parse_args()
else:
return parser.parse_args(arguments)
return parser.parse_args(arguments)