summaryrefslogtreecommitdiff
path: root/git/test/lib/helper.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-01-04 13:48:29 +0100
committerSebastian Thiel <byronimo@gmail.com>2015-01-04 13:48:29 +0100
commitc80d727e374321573bb00e23876a67c77ff466e3 (patch)
tree7590d6ae544eac56e83639d27e1f9013b38d8a4b /git/test/lib/helper.py
parent965a08c3f9f2fbd62691d533425c699c943cb865 (diff)
downloadgitpython-c80d727e374321573bb00e23876a67c77ff466e3.tar.gz
Bumped version, updated changelog, reduced code smell
There is more work to do though, as many imports are still incorrect. Also, there are still print statements
Diffstat (limited to 'git/test/lib/helper.py')
-rw-r--r--git/test/lib/helper.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/git/test/lib/helper.py b/git/test/lib/helper.py
index 341f5789..a18f22ef 100644
--- a/git/test/lib/helper.py
+++ b/git/test/lib/helper.py
@@ -75,7 +75,7 @@ def _rmtree_onerror(osremove, fullpath, exec_info):
if os.name != 'nt' or osremove is not os.remove:
raise
- os.chmod(fullpath, 0777)
+ os.chmod(fullpath, 0o777)
os.remove(fullpath)
@@ -194,26 +194,27 @@ def with_rw_and_rw_remote_repo(working_tree_ref):
gd = Git().daemon(temp_dir, as_process=True)
# yes, I know ... fortunately, this is always going to work if sleep time is just large enough
time.sleep(0.5)
- except Exception as err:
+ except Exception:
gd = None
# end
# try to list remotes to diagnoes whether the server is up
try:
rw_repo.git.ls_remote(d_remote)
- except GitCommandError, e:
+ except GitCommandError as e:
# We assume in good faith that we didn't start the daemon - but make sure we kill it anyway
# Of course we expect it to work here already, but maybe there are timing constraints
# on some platforms ?
if gd is not None:
os.kill(gd.proc.pid, 15)
- print str(e)
+ print(str(e))
if os.name == 'nt':
- raise AssertionError(
- 'git-daemon needs to run this test, but windows does not have one. Otherwise, run: git-daemon "%s"' % temp_dir)
+ msg = "git-daemon needs to run this test, but windows does not have one. "
+ msg += 'Otherwise, run: git-daemon "%s"' % temp_dir
+ raise AssertionError(msg)
else:
- raise AssertionError(
- 'Please start a git-daemon to run this test, execute: git-daemon "%s"' % temp_dir)
+ msg = 'Please start a git-daemon to run this test, execute: git-daemon "%s"' % temp_dir
+ raise AssertionError(msg)
# END make assertion
# END catch ls remote error