From a9fadd6ccf77ea151b495784958aca5f97e1603e Mon Sep 17 00:00:00 2001 From: Carl Chenet Date: Tue, 1 Aug 2017 18:29:24 +0200 Subject: [PATCH] verify the path to the hashtaglist --- feed2toot/cliparse.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/feed2toot/cliparse.py b/feed2toot/cliparse.py index 1411ad8..a67cba3 100644 --- a/feed2toot/cliparse.py +++ b/feed2toot/cliparse.py @@ -98,6 +98,11 @@ class CliParse: # verify if a configuration file is provided if not self.opts.configs: sys.exit('no configuration file was found at the specified path(s) with the option -c') + # verify the path to the hashtaglist + if self.opts.hashtaglist: + hashtaglist = os.path.expanduser(self.opts.hashtaglist) + if not os.path.exists(hashtaglist): + sys.exit('the {hashtaglist} file does not seem to exist, please provide a valid path'.format(hashtaglist=hashtaglist)) @property def options(self):