| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -46,7 +46,7 @@ install: | |||
| 46 | 46 | echo %PATH% | |
| 47 | 47 | uname -a | |
| 48 | 48 | git --version | |
| 49 | - where git git-daemon python pip pip3 pip34 | ||
| 49 | + where git git-daemon python pip pip3 pip34 sh | ||
| 50 | 50 | python --version | |
| 51 | 51 | python -c "import struct; print(struct.calcsize('P') * 8)" | |
| 52 | 52 | ||
@@ -91,3 +91,11 @@ test_script: | |||
| 91 | 91 | ||
| 92 | 92 | on_success: | |
| 93 | 93 | - IF "%PYTHON_VERSION%" == "3.5" IF NOT "%IS_CYGWIN%" == "yes" (codecov) | |
| 94 | + | ||
| 95 | + # Enable this to be able to login to the build worker. You can use the | ||
| 96 | + # `remmina` program in Ubuntu, use the login information that the line below | ||
| 97 | + # prints into the log. | ||
| 98 | + #on_finish: | ||
| 99 | + # - | | ||
| 100 | + # echo "Running on_finish to establish connection back to the instance" | ||
| 101 | + # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,5 +25,6 @@ Contributors are: | |||
| 25 | 25 | -Piotr Babij <piotr.babij _at_ gmail.com> | |
| 26 | 26 | -Mikuláš Poul <mikulaspoul _at_ gmail.com> | |
| 27 | 27 | -Charles Bouchard-Légaré <cblegare.atl _at_ ntis.ca> | |
| 28 | + -Yaroslav Halchenko <debian _at_ onerussian.com> | ||
| 28 | 29 | ||
| 29 | 30 | Portions derived from other open source works and are clearly marked. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -309,5 +309,5 @@ def register_surrogateescape(): | |||
| 309 | 309 | ||
| 310 | 310 | try: | |
| 311 | 311 | b"100644 \x9f\0aaa".decode(defenc, "surrogateescape") | |
| 312 | - except: | ||
| 312 | + except Exception: | ||
| 313 | 313 | register_surrogateescape() | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -313,20 +313,20 @@ def __str__(self): | |||
| 313 | 313 | h %= self.b_blob.path | |
| 314 | 314 | ||
| 315 | 315 | msg = '' | |
| 316 | - l = None # temp line | ||
| 317 | - ll = 0 # line length | ||
| 316 | + line = None # temp line | ||
| 317 | + line_length = 0 # line length | ||
| 318 | 318 | for b, n in zip((self.a_blob, self.b_blob), ('lhs', 'rhs')): | |
| 319 | 319 | if b: | |
| 320 | - l = "\n%s: %o | %s" % (n, b.mode, b.hexsha) | ||
| 320 | + line = "\n%s: %o | %s" % (n, b.mode, b.hexsha) | ||
| 321 | 321 | else: | |
| 322 | - l = "\n%s: None" % n | ||
| 322 | + line = "\n%s: None" % n | ||
| 323 | 323 | # END if blob is not None | |
| 324 | - ll = max(len(l), ll) | ||
| 325 | - msg += l | ||
| 324 | + line_length = max(len(line), line_length) | ||
| 325 | + msg += line | ||
| 326 | 326 | # END for each blob | |
| 327 | 327 | ||
| 328 | 328 | # add headline | |
| 329 | - h += '\n' + '=' * ll | ||
| 329 | + h += '\n' + '=' * line_length | ||
| 330 | 330 | ||
| 331 | 331 | if self.deleted_file: | |
| 332 | 332 | msg += '\nfile deleted in rhs' | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -48,7 +48,7 @@ def __init__(self, command, status=None, stderr=None, stdout=None): | |||
| 48 | 48 | else: | |
| 49 | 49 | try: | |
| 50 | 50 | status = u'exit code(%s)' % int(status) | |
| 51 | - except: | ||
| 51 | + except (ValueError, TypeError): | ||
| 52 | 52 | s = safe_decode(str(status)) | |
| 53 | 53 | status = u"'%s'" % s if isinstance(status, string_types) else s | |
| 54 | 54 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -246,7 +246,7 @@ def to_file(self, filepath): | |||
| 246 | 246 | try: | |
| 247 | 247 | self._serialize(fp) | |
| 248 | 248 | lfd.commit() | |
| 249 | - except: | ||
| 249 | + except Exception: | ||
| 250 | 250 | # on failure it rolls back automatically, but we make it clear | |
| 251 | 251 | lfd.rollback() | |
| 252 | 252 | raise | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -542,9 +542,11 @@ def urls(self): | |||
| 542 | 542 | if ' Push URL:' in line: | |
| 543 | 543 | yield line.split(': ')[-1] | |
| 544 | 544 | except GitCommandError as ex: | |
| 545 | - if any([msg in str(ex) for msg in ['correct access rights','cannot run ssh']]): | ||
| 546 | - # If ssh is not setup to access this repository, see issue 694 | ||
| 547 | - result = Git().execute(['git','config','--get','remote.%s.url' % self.name]) | ||
| 545 | + if any([msg in str(ex) for msg in ['correct access rights', 'cannot run ssh']]): | ||
| 546 | + # If ssh is not setup to access this repository, see issue 694 | ||
| 547 | + result = Git().execute( | ||
| 548 | + ['git', 'config', '--get', 'remote.%s.url' % self.name] | ||
| 549 | + ) | ||
| 548 | 550 | yield result | |
| 549 | 551 | else: | |
| 550 | 552 | raise ex | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -203,7 +203,7 @@ def __exit__(self, exc_type, exc_value, traceback): | |||
| 203 | 203 | def __del__(self): | |
| 204 | 204 | try: | |
| 205 | 205 | self.close() | |
| 206 | - except: | ||
| 206 | + except Exception: | ||
| 207 | 207 | pass | |
| 208 | 208 | ||
| 209 | 209 | def close(self): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -139,7 +139,7 @@ def repo_creator(self): | |||
| 139 | 139 | try: | |
| 140 | 140 | try: | |
| 141 | 141 | return func(self, rw_repo) | |
| 142 | - except: | ||
| 142 | + except: # noqa E722 | ||
| 143 | 143 | log.info("Keeping repo after failure: %s", repo_dir) | |
| 144 | 144 | repo_dir = None | |
| 145 | 145 | raise | |
@@ -227,7 +227,7 @@ def with_rw_and_rw_remote_repo(working_tree_ref): | |||
| 227 | 227 | Same as with_rw_repo, but also provides a writable remote repository from which the | |
| 228 | 228 | rw_repo has been forked as well as a handle for a git-daemon that may be started to | |
| 229 | 229 | run the remote_repo. | |
| 230 | - The remote repository was cloned as bare repository from the rorepo, whereas | ||
| 230 | + The remote repository was cloned as bare repository from the ro repo, whereas | ||
| 231 | 231 | the rw repo has a working tree and was cloned from the remote repository. | |
| 232 | 232 | ||
| 233 | 233 | remote_repo has two remotes: origin and daemon_origin. One uses a local url, | |
@@ -296,7 +296,7 @@ def remote_repo_creator(self): | |||
| 296 | 296 | with cwd(rw_repo.working_dir): | |
| 297 | 297 | try: | |
| 298 | 298 | return func(self, rw_repo, rw_daemon_repo) | |
| 299 | - except: | ||
| 299 | + except: # noqa E722 | ||
| 300 | 300 | log.info("Keeping repos after failure: \n rw_repo_dir: %s \n rw_daemon_repo_dir: %s", | |
| 301 | 301 | rw_repo_dir, rw_daemon_repo_dir) | |
| 302 | 302 | rw_repo_dir = rw_daemon_repo_dir = None | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -169,8 +169,7 @@ def test_traversal(self): | |||
| 169 | 169 | # at some point, both iterations should stop | |
| 170 | 170 | self.assertEqual(list(bfirst)[-1], first) | |
| 171 | 171 | stoptraverse = self.rorepo.commit("254d04aa3180eb8b8daf7b7ff25f010cd69b4e7d").traverse(as_edge=True) | |
| 172 | - l = list(stoptraverse) | ||
| 173 | - self.assertEqual(len(l[0]), 2) | ||
| 172 | + self.assertEqual(len(next(stoptraverse)), 2) | ||
| 174 | 173 | ||
| 175 | 174 | # ignore self | |
| 176 | 175 | self.assertEqual(next(start.traverse(ignore_self=False)), start) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments