| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b1a2271 commit 697702e
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -926,7 +926,7 @@ def add(self, items, force=True, fprogress=lambda *args: None): | |||
| 926 | 926 | self._write_path_to_stdin(proc, filepath, filepath, make_exc, fprogress, read_from_stdout=False) | |
| 927 | 927 | added_files.append(filepath) | |
| 928 | 928 | # END for each filepath | |
| 929 | - self._flush_stdin_and_wait(proc) # ignore stdout | ||
| 929 | + self._flush_stdin_and_wait(proc, ignore_stdout=True) # ignore stdout | ||
| 930 | 930 | ||
| 931 | 931 | # force rereading our entries once it is all done | |
| 932 | 932 | del(self.entries) | |
@@ -978,7 +978,7 @@ def add(self, items, force=True, fprogress=lambda *args: None): | |||
| 978 | 978 | if not progress_sent: | |
| 979 | 979 | fprogress(entry.path, True, entry) | |
| 980 | 980 | # END for each enty | |
| 981 | - self._flush_stdin_and_wait(proc) | ||
| 981 | + self._flush_stdin_and_wait(proc, ignore_stdout=True) | ||
| 982 | 982 | entries_added.extend(entries) | |
| 983 | 983 | # END if there are base entries | |
| 984 | 984 | ||
@@ -1059,10 +1059,13 @@ def commit(self, message, parent_commits=None, head=True): | |||
| 1059 | 1059 | return Commit.create_from_tree(self.repo, tree_sha, message, parent_commits, head) | |
| 1060 | 1060 | ||
| 1061 | 1061 | @classmethod | |
| 1062 | - def _flush_stdin_and_wait(cls, proc): | ||
| 1062 | + def _flush_stdin_and_wait(cls, proc, ignore_stdout = False): | ||
| 1063 | 1063 | proc.stdin.flush() | |
| 1064 | 1064 | proc.stdin.close() | |
| 1065 | - stdout = proc.stdout.read() | ||
| 1065 | + stdout = '' | ||
| 1066 | + if not ignore_stdout: | ||
| 1067 | + stdout = proc.stdout.read() | ||
| 1068 | + proc.stdout.close() | ||
| 1066 | 1069 | proc.wait() | |
| 1067 | 1070 | return stdout | |
| 1068 | 1071 | ||
@@ -1192,7 +1195,7 @@ def handle_stderr(proc, iter_checked_out_files): | |||
| 1192 | 1195 | checked_out_files.append(path) | |
| 1193 | 1196 | # END path is a file | |
| 1194 | 1197 | # END for each path | |
| 1195 | - self._flush_stdin_and_wait(proc) | ||
| 1198 | + self._flush_stdin_and_wait(proc, ignore_stdout=True) | ||
| 1196 | 1199 | ||
| 1197 | 1200 | handle_stderr(proc, checked_out_files) | |
| 1198 | 1201 | return checked_out_files | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -139,7 +139,7 @@ def _has_lock(self): | |||
| 139 | 139 | raise AssertionError("The lock file at %s could not be read" % lock_file) | |
| 140 | 140 | ||
| 141 | 141 | if pid != os.getpid(): | |
| 142 | - raise AssertionError("We claim to own the lock at %s, but it was not owned by our process: %i" % (lock_file, os.getpid())) | ||
| 142 | + raise AssertionError("We claim to own the lock at %s, but it was not owned by our process %i, but by %i" % (lock_file, os.getpid(), pid)) | ||
| 143 | 143 | ||
| 144 | 144 | return True | |
| 145 | 145 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments