Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[make_changelog] avoid except without specifying class #7583

Merged
merged 1 commit into from
Nov 1, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions utils/make_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def http_get_json(url, token, max_retries, retry_timeout):
logging.warning(msg)
time.sleep(retry_timeout)
continue
except:
except Exception:
pass

raise Exception(msg)
Expand All @@ -60,7 +60,7 @@ def get_merge_base(first, second, project_root):
sha = tuple(filter(len, text.split()))[0]
check_sha(sha)
return sha
except:
except Exception:
logging.error('Cannot find merge base for %s and %s', first, second)
raise

Expand Down Expand Up @@ -198,7 +198,7 @@ def process_unknown_commits(commits, commits_info, users):
# First, try get name from github user
try:
name = users[login]['name']
except:
except KeyError:
pass
else:
login = 'Unknown'
Expand All @@ -207,7 +207,7 @@ def process_unknown_commits(commits, commits_info, users):
if not name:
try:
name = info['commit']['author']['name']
except:
except KeyError:
pass

author = '[{}]({})'.format(name or login, info['author']['html_url'])
Expand Down