| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 152a60f commit 982eefb
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -192,10 +192,14 @@ def test_environment(self, rw_dir): | |||
| 192 | 192 | rw_repo = Repo.init(os.path.join(rw_dir, 'repo')) | |
| 193 | 193 | remote = rw_repo.create_remote('ssh-origin', "ssh://git@server/foo") | |
| 194 | 194 | ||
| 195 | - with rw_repo.git.custom_environment(GIT_SSH=path): | ||
| 196 | - try: | ||
| 197 | - remote.fetch() | ||
| 198 | - except GitCommandError as err: | ||
| 199 | - assert 'FOO' in str(err) | ||
| 195 | + # This only works if we are not evaluating git-push/pull output in a thread ! | ||
| 196 | + import select | ||
| 197 | + if hasattr(select, 'poll'): | ||
| 198 | + with rw_repo.git.custom_environment(GIT_SSH=path): | ||
| 199 | + try: | ||
| 200 | + remote.fetch() | ||
| 201 | + except GitCommandError as err: | ||
| 202 | + assert 'FOO' in str(err) | ||
| 203 | + # end | ||
| 200 | 204 | # end | |
| 201 | - # end | ||
| 205 | + # end if select.poll exists | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments