summaryrefslogtreecommitdiffstats
path: root/src/pyfedpkg/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/pyfedpkg/__init__.py')
-rw-r--r--src/pyfedpkg/__init__.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py
index 920c85e..709e922 100644
--- a/src/pyfedpkg/__init__.py
+++ b/src/pyfedpkg/__init__.py
@@ -356,11 +356,9 @@ def get_latest_commit(module):
# Return the hash sum
return output.split()[0]
-def import_srpm(repo, srpm, path=os.getcwd()):
+def import_srpm(srpm, path=os.getcwd()):
"""Import the contents of an srpm into a repo.
- repo: a git repo object to use for the import
-
srpm: File to import contents from
path: optional path to work in, defaults to cwd.
@@ -378,6 +376,7 @@ def import_srpm(repo, srpm, path=os.getcwd()):
if not os.path.exists(srpm):
raise FedpkgError('File not found.')
# bail if we're dirty
+ repo = git.Repo(path)
if repo.is_dirty():
raise FedpkgError('There are uncommitted changes in your repo')
# Get the details of the srpm