Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1177 from cclauss/patch-2
Browse files Browse the repository at this point in the history
except ParseError: --> except ParseError as e:
  • Loading branch information
peterschwarz committed Nov 24, 2017
2 parents 4d639fe + 4822336 commit b1b6b08
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cli/sawtooth_cli/identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ def _read_signer(key_filename):

try:
private_key = Secp256k1PrivateKey.from_hex(signing_key)
except ParseError:
except ParseError as e:
try:
private_key = Secp256k1PrivateKey.from_wif(signing_key)
except ParseError:
Expand Down
2 changes: 1 addition & 1 deletion cli/sawtooth_cli/sawset.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def _read_signer(key_filename):
except ParseError:
try:
private_key = Secp256k1PrivateKey.from_wif(signing_key)
except ParseError:
except ParseError as e:
raise CliException('Unable to read key in file: {}'.format(str(e)))

context = create_context('secp256k1')
Expand Down
2 changes: 1 addition & 1 deletion consensus/poet/cli/sawtooth_poet_cli/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def _read_signer(key_filename):
except ParseError:
try:
private_key = Secp256k1PrivateKey.from_wif(signing_key)
except ParseError:
except ParseError as e:
raise CliException('Unable to read key in file: {}'.format(str(e)))

context = create_context('secp256k1')
Expand Down
2 changes: 1 addition & 1 deletion validator/sawtooth_validator/server/keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def load_identity_signer(key_dir, key_name):
except signing.ParseError:
try:
private_key = Secp256k1PrivateKey.from_wif(private_key_str)
except signing.ParseError:
except signing.ParseError as e:
raise LocalConfigurationError(
"Invalid key in file {}: {}".format(key_path, str(e)))

Expand Down

0 comments on commit b1b6b08

Please sign in to comment.