diff options
-rw-r--r-- | src/pyfedpkg/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py index 5c3afcd..e04191a 100644 --- a/src/pyfedpkg/__init__.py +++ b/src/pyfedpkg/__init__.py @@ -1032,12 +1032,12 @@ class PackageModule: return subprocess.Popen(['rpm --eval %{_arch}'], shell=True, stdout=subprocess.PIPE).communicate()[0].strip('\n') - def __init__(self, path=None): + def __init__(self, path): # 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 |