summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pyfedpkg/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py
index 78e2b2e..edcbbd8 100644
--- a/src/pyfedpkg/__init__.py
+++ b/src/pyfedpkg/__init__.py
@@ -1070,12 +1070,12 @@ class PackageModule:
return subprocess.Popen(['rpm --eval %{_arch}'], shell=True,
stdout=subprocess.PIPE).communicate()[0].strip('\n')
- def __init__(self, path=None, dist=None):
+ def __init__(self, path, dist=None):
# Initiate a PackageModule object in a given path
# Set some global variables used throughout
- if not path:
- path = os.getcwd()
log.debug('Creating module object from %s' % path)
+ if not os.path.isdir(path):
+ raise FedpkgError('Module directory not found: %s' % path)
self.path = path
self.lookaside = LOOKASIDE
self.lookasidehash = LOOKASIDEHASH