Skip to content

Commit eb7e569

Browse files
fixed some code style issues
1 parent cd29837 commit eb7e569

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

ssh_proxy_server/audit/cli.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def check_publickey(args: argparse.Namespace) -> bool:
1414
key = open(args.public_key, 'rt').read()
1515
try:
1616
pubkey = PublicBlob.from_string(key)
17-
except:
17+
except ValueError:
1818
print("file is not a valid public key")
1919
return False
2020
if probe_host(
@@ -25,9 +25,8 @@ def check_publickey(args: argparse.Namespace) -> bool:
2525
):
2626
print("valid key")
2727
return True
28-
else:
29-
print("bad key")
30-
return False
28+
print("bad key")
29+
return False
3130

3231

3332
@typechecked

ssh_proxy_server/plugins/sftp/replace_file.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,4 @@ def handle_data(self, data: bytes, *, offset: Optional[int] = None, length: Opti
7676
return self.replacement.read()
7777
if length is not None:
7878
return self.replacement.read(length)
79-
else:
80-
return b''
79+
return b''

0 commit comments

Comments
 (0)