Skip to content

Commit e97e992

Browse files
author
ekultek
committed
fixing some exceptions to be more acceptable with pep coding style
1 parent 4f88c18 commit e97e992

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/exploitation/exploiter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def whitelist_wash(hosts, whitelist_file):
2929
washed_hosts.append(host)
3030

3131
return washed_hosts
32-
except Exception:
32+
except IOError:
3333
lib.output.warning("unable to whitewash host list, does the file exist?")
3434
return hosts
3535

lib/jsonize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def load_exploits(path, node="exploits"):
5858
try:
5959
selected_file = file_list[int(action) - 1]
6060
selected = True
61-
except Exception:
61+
except Except:
6262
lib.output.warning("invalid selection ('{}'), select from below".format(action))
6363
selected = False
6464
else:

lib/term/terminal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ def do_load_custom_hosts(self, file_path):
385385

386386
try:
387387
open("{}".format(file_path)).close()
388-
except Exception:
388+
except IOError:
389389
lib.output.error("file does not exist, check the path and try again")
390390
return
391391
lib.output.warning("overwriting hosts file with provided, and backing up current")

0 commit comments

Comments
 (0)