diff options
| author | David Pursehouse <david.pursehouse@sonymobile.com> | 2012-10-25 12:23:11 +0900 |
|---|---|---|
| committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2012-10-30 10:28:20 +0900 |
| commit | 1d947b30342163b723c96db563967323535fef45 (patch) | |
| tree | b6b02d02df01792b356b9e50ceeaadcaf3a2e8c5 /git_refs.py | |
| parent | 2d113f35460051823ea54d61c5c939565518f969 (diff) | |
| download | git-repo-1d947b30342163b723c96db563967323535fef45.tar.gz | |
Even more coding style cleanup
Fixing some more pylint warnings:
W1401: Anomalous backslash in string
W0623: Redefining name 'name' from outer scope
W0702: No exception type(s) specified
E0102: name: function already defined line n
Change-Id: I5afcdb4771ce210390a79981937806e30900a93c
Diffstat (limited to 'git_refs.py')
| -rw-r--r-- | git_refs.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git_refs.py b/git_refs.py index 18c9230c..cfeffba9 100644 --- a/git_refs.py +++ b/git_refs.py | |||
| @@ -138,14 +138,14 @@ class GitRefs(object): | |||
| 138 | def _ReadLoose1(self, path, name): | 138 | def _ReadLoose1(self, path, name): |
| 139 | try: | 139 | try: |
| 140 | fd = open(path, 'rb') | 140 | fd = open(path, 'rb') |
| 141 | except: | 141 | except IOError: |
| 142 | return | 142 | return |
| 143 | 143 | ||
| 144 | try: | 144 | try: |
| 145 | try: | 145 | try: |
| 146 | mtime = os.path.getmtime(path) | 146 | mtime = os.path.getmtime(path) |
| 147 | ref_id = fd.readline() | 147 | ref_id = fd.readline() |
| 148 | except: | 148 | except (IOError, OSError): |
| 149 | return | 149 | return |
| 150 | finally: | 150 | finally: |
| 151 | fd.close() | 151 | fd.close() |
