Skip to content

Commit

Permalink
little better exception printing, removed setup/teardown in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yaroslaff committed Oct 26, 2022
1 parent 328cc10 commit 03c4963
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
4 changes: 2 additions & 2 deletions bin/showcert
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ from collections import namedtuple



version = '0.1.11'
version = '0.1.12'
args = None

phrase = namedtuple('Phrase', 'say wait expect')
Expand Down Expand Up @@ -367,7 +367,7 @@ def process_cert(CERT, name=None, insecure=False, warn=False, starttls='auto'):
try:
verify_chain(chain, hostname)
except X509StoreContextError as e:
print("Verification error (use -i):", e.args[0][2])
print("Verification error (use -i):", e.args[0])
return 1
except InvalidCertificate as e:
print("Verification error (use -i):", e)
Expand Down
9 changes: 1 addition & 8 deletions tests/test_showcert.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,4 @@ def test_imaps(self):
print(site)
rc = subprocess.run([self.showcert, site])
assert(rc.returncode == 0)



def teardown(self):
pass

def setup(self):
pass

0 comments on commit 03c4963

Please sign in to comment.