diff options
author | Jesse Keating <jkeating@redhat.com> | 2010-08-20 14:44:24 -0700 |
---|---|---|
committer | Jesse Keating <jkeating@redhat.com> | 2010-08-20 14:44:24 -0700 |
commit | 9a3ba09498a59651eb7c6acd716b12526b6ae382 (patch) | |
tree | ac50c0224012ba9b3798d8e6e5768bc1cde20109 /src/pyfedpkg/__init__.py | |
parent | 64de44f9c840da0d51e9a91da08e3abb043d235a (diff) | |
download | fedora-packager-9a3ba09498a59651eb7c6acd716b12526b6ae382.tar.gz fedora-packager-9a3ba09498a59651eb7c6acd716b12526b6ae382.tar.xz fedora-packager-9a3ba09498a59651eb7c6acd716b12526b6ae382.zip |
Make use of _run_command's cwd option.
Diffstat (limited to 'src/pyfedpkg/__init__.py')
-rw-r--r-- | src/pyfedpkg/__init__.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py index f4a02bf..2dfb0c4 100644 --- a/src/pyfedpkg/__init__.py +++ b/src/pyfedpkg/__init__.py @@ -453,11 +453,6 @@ def commit(path=None, message=None, file=None, files=[]): if not message or not file: raise FedpkgError('Must have a commit message or be on a real tty.') - # Deal with path - curdir = os.getcwd() - if path: - os.chdir(path) - # construct the git command # We do this via subprocess because the git module is terrible. cmd = ['git', 'commit'] @@ -470,8 +465,7 @@ def commit(path=None, message=None, file=None, files=[]): else: cmd.extend(files) # make it so - _run_command(cmd) - os.chdir(curdir) + _run_command(cmd, cwd=path) return def get_latest_commit(module): |