diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2016-05-29 10:29:54 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2016-05-29 10:29:54 +0200 |
commit | 98889c3ec73bf929cdcb44b92653e429b4955652 (patch) | |
tree | ef0ffb25c03aca53053308c91cd05d972e72bc5c /git/util.py | |
parent | ece57af3b69c38f4dcd19e8ccdd07ec38f899b23 (diff) | |
download | gitpython-98889c3ec73bf929cdcb44b92653e429b4955652.tar.gz |
chore(misc): cleanup and docs
Minor adjustments to PR to match current code style.
Related to #450
Diffstat (limited to 'git/util.py')
-rw-r--r-- | git/util.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/git/util.py b/git/util.py index 9b86b191..021018d1 100644 --- a/git/util.py +++ b/git/util.py @@ -179,11 +179,7 @@ class RemoteProgress(object): re_op_relative = re.compile(r"(remote: )?([\w\s]+):\s+(\d+)% \((\d+)/(\d+)\)(.*)") def __init__(self, progress_function=None): - if progress_function is not None: - self.__progress_function = progress_function - else: - self.__progress_function = self.update - + self.__progress_function = progress_function if progress_function else self.update self._seen_ops = list() self._cur_line = None @@ -273,9 +269,9 @@ class RemoteProgress(object): message = message.strip(self.TOKEN_SEPARATOR) self.__progress_function(op_code, - cur_count and float(cur_count), - max_count and float(max_count), - message) + cur_count and float(cur_count), + max_count and float(max_count), + message) # END for each sub line return failed_lines @@ -319,6 +315,7 @@ class RemoteProgress(object): You may read the contents of the current line in self._cur_line""" pass + class Actor(object): """Actors hold information about a person acting on the repository. They |