Skip to content

Commit

Permalink
Minor coverage tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ronf committed Oct 13, 2024
1 parent 2fa354d commit f1848c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion asyncssh/crypto/cipher.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

try:
import cryptography.hazmat.decrepit.ciphers.algorithms as _decrepit_algs
except ImportError:
except ImportError: # pragma: no cover
_decrepit_algs = None


Expand Down
8 changes: 4 additions & 4 deletions asyncssh/gss_win32.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def sign(self, data: bytes) -> bytes:

try:
return self._ctx.sign(data)
except SSPIError as exc:
except SSPIError as exc: # pragna: no cover
raise GSSError(details=exc.strerror) from None

def verify(self, data: bytes, sig: bytes) -> bool:
Expand All @@ -159,7 +159,7 @@ class GSSClient(GSSBase):

def __init__(self, host: str, store: Optional[BytesOrStrDict],
delegate_creds: bool):
if store is not None:
if store is not None: # pragna: no cover
raise GSSError(details='GSS store not supported on Windows')

super().__init__(host)
Expand All @@ -172,7 +172,7 @@ def __init__(self, host: str, store: Optional[BytesOrStrDict],
try:
self._ctx = ClientAuth('Kerberos', targetspn=self._host,
scflags=flags)
except SSPIError as exc:
except SSPIError as exc: # pragna: no cover
raise GSSError(1, 1, details=exc.strerror) from None

self._init_token = self.step(None)
Expand All @@ -185,7 +185,7 @@ class GSSServer(GSSBase):
_integrity_flag = ASC_RET_INTEGRITY

def __init__(self, host: str, store: Optional[BytesOrStrDict]):
if store is not None:
if store is not None: # pragna: no cover
raise GSSError(details='GSS store not supported on Windows')

super().__init__(host)
Expand Down

0 comments on commit f1848c1

Please sign in to comment.