- commit
- ecf05540f537f947c0eb1f209a47ce231d18a6a5
- parent
- 5d6ff329fa13b98983ad5b0b127ce53c1ae6abfa
- Author
- Tobias Bengfort <tobias.bengfort@gmx.net>
- Date
- 2015-03-22 17:13
Gardening: pylint
Diffstat
| M | project_stats.py | 8 | ++++---- |
1 files changed, 4 insertions, 4 deletions
diff --git a/project_stats.py b/project_stats.py
@@ -173,7 +173,7 @@ def get_bower_info(name): 173 173 174 174 @ttl_cache('xi-projects', ttl=3600) 175 175 def get_json(url, user=None, password=None):176 -1 assert not ((user is None) ^ (password is None))-1 176 assert not (user is None) ^ (password is None) 177 177 178 178 if user is None: 179 179 req = requests.get(url) @@ -195,7 +195,7 @@ def get_github(url, user=None, password=None): 195 195 def _get_json(url): 196 196 data = get_json(url, user=user, password=password) 197 197 if 'documentation_url' in data:198 -1 raise requests.RequestError(data['documentation_url'])-1 198 raise requests.HTTPError(data['documentation_url']) 199 199 return data 200 200 201 201 def get_all_pages(url): @@ -215,7 +215,7 @@ def get_github(url, user=None, password=None): 215 215 216 216 def get_latest_tag(): 217 217 tags = get_all_pages(data['tags_url'])218 -1 tags = map(lambda tag: tag['name'], tags)-1 218 tags = [tag['name'] for tag in tags] 219 219 if len(tags) > 0: 220 220 return max(tags, key=lambda tag: tag.lstrip('v')) 221 221 @@ -368,7 +368,7 @@ def get_projects(projects_config): 368 368 369 369 projects[key] = claims 370 370 except Exception as e:371 -1 logging.error('Error while gathering stats for %s: %s' % (key, e))-1 371 logging.error('Error while gathering stats for %s: %s', key, e) 372 372 return projects 373 373 374 374