Skip to content

Commit

Permalink
Merge pull request #21 from kyleam/exception-no-message
Browse files Browse the repository at this point in the history
Don't use now-removed Exception.message attribute
  • Loading branch information
mhagger committed Nov 12, 2018
2 parents ec29487 + 0bfd14d commit ab6af78
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bin/git-when-merged
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def read_refpatterns(name):
except re.error as e:
sys.stderr.write(
'Error compiling branch pattern %r; ignoring: %s\n'
% (value, e.message,)
% (value, e,)
)
return retval

Expand Down Expand Up @@ -549,7 +549,7 @@ def main(args):
try:
commit = rev_parse('%s^{commit}' % (options.commit,))
except Failure as e:
sys.exit(e.message)
sys.exit(str(e))

refpatterns = []

Expand All @@ -559,14 +559,14 @@ def main(args):
except re.error as e:
sys.stderr.write(
'Error compiling pattern %r; ignoring: %s\n'
% (value, e.message,)
% (value, e,)
)

for value in options.names:
try:
refpatterns.extend(read_refpatterns(value))
except Failure as e:
sys.exit(e.message)
sys.exit(str(e))

branches = set()

Expand All @@ -581,7 +581,7 @@ def main(args):
try:
branches.add(get_full_name(branch))
except Failure as e:
sys.exit(e.message)
sys.exit(str(e))

if not branches:
branches.add(get_full_name('HEAD'))
Expand Down Expand Up @@ -641,7 +641,7 @@ def main(args):
except MergeNotFoundError as e:
warn(WARN_FORMAT % dict(refname=e.refname, msg=e.msg))
except Failure as e:
sys.exit('%s' % (e.message,))
sys.exit('%s' % (e,))


main(sys.argv[1:])
Expand Down

0 comments on commit ab6af78

Please sign in to comment.