Check existance of local packages dir
authorZhang Qiang <qiang.z.zhang@intel.com>
Wed, 4 Jan 2012 08:03:45 +0000 (16:03 +0800)
committerZhang Qiang <qiang.z.zhang@intel.com>
Wed, 4 Jan 2012 08:03:45 +0000 (16:03 +0800)
mic/creator.py

index a55132e..5b28deb 100644 (file)
@@ -156,6 +156,9 @@ class Creator(cmdln.Cmdln):
             configmgr.create['cachedir'] = self.options.cachedir
         os.environ['ZYPP_LOCKFILE_ROOT'] = configmgr.create['cachedir']
         if self.options.local_pkgs_path is not None:
+            if not os.path.exists(self.options.local_pkgs_path):
+                msger.error('Local pkgs directory: \'%s\' not exist' \
+                              % self.options.local_pkgs_path)
             configmgr.create['local_pkgs_path'] = self.options.local_pkgs_path
 
         if self.options.release: