diff options
Diffstat (limited to 'src/pyfedpkg')
-rw-r--r-- | src/pyfedpkg/__init__.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py index 073169f..5ac11a0 100644 --- a/src/pyfedpkg/__init__.py +++ b/src/pyfedpkg/__init__.py @@ -1067,7 +1067,7 @@ 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=None, dist=None): # Initiate a PackageModule object in a given path # Set some global variables used throughout if not path: @@ -1091,7 +1091,10 @@ class PackageModule: raise FedpkgError('%s is not a valid repo' % path) # Find the branch and set things based from that # Still requires a 'branch' file in each branch - self.branch = self._findbranch() + if dist: + self.branch = dist + else: + self.branch = self._findbranch() if self.branch.startswith('f'): self.distval = self.branch.split('f')[1] self.distvar = 'fedora' |