bugfix: check the existance of specified package dir
authorZhang Qiang <qiang.z.zhang@intel.com>
Wed, 12 Mar 2014 09:58:12 +0000 (17:58 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Wed, 12 Mar 2014 09:59:17 +0000 (17:59 +0800)
Change-Id: I367fb10aa4cad247711ea797a2c6c5c398f03555

gitbuildsys/utils.py

index 1c2510a..b7857c3 100644 (file)
@@ -531,6 +531,11 @@ class SearchConfAction(argparse.Action):
     """
     def __call__(self, parser, namespace, value, option_string=None):
         workdir = value
+
+        if not os.path.exists(workdir):
+            raise GbsError("specified package dir %s does not exist" \
+                           % workdir)
+
         try:
             repo = RpmGitRepository(value)
             workdir = repo.path