UpstreamSource: check that the sources exist
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Fri, 23 Aug 2013 11:04:12 +0000 (14:04 +0300)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Mar 2015 08:07:46 +0000 (10:07 +0200)
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
gbp/pkg/__init__.py

index ff0ac6d3335b90f22ffb5c4ca964b636fbc0e586..df7da9942c43b3288bdfd3d5c60f46e3beee47b2 100644 (file)
@@ -317,6 +317,8 @@ class UpstreamSource(object):
         self._tarball = False
         self._pkg_policy = pkg_policy
         self._path = os.path.abspath(name)
+        if not os.path.exists(self._path):
+            raise GbpError('UpstreamSource: unable to find %s' % self._path)
         self.unpacked = unpacked
         self._filename_base, \
         self._archive_fmt, \