Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 834be1e

Browse files
committed
Restyling redundant 'except Exception' form
1 parent acfeeb4 commit 834be1e

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

extra/beep/beep.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def beep():
2424
_linux_wav_play(BEEP_WAV_FILENAME)
2525
else:
2626
_speaker_beep()
27-
except Exception:
27+
except:
2828
_speaker_beep()
2929

3030
def _speaker_beep():

lib/core/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3192,7 +3192,7 @@ def _(value):
31923192

31933193
try:
31943194
retVal = applyFunctionRecursively(value, _)
3195-
except Exception:
3195+
except:
31963196
singleTimeWarnMessage("there was a problem decoding value '%s' from expected hexadecimal form" % value)
31973197

31983198
return retVal

lib/core/option.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ def _(key, value):
639639
_ = ConnectRegistry(None, HKEY_LOCAL_MACHINE)
640640
_ = OpenKey(_, key)
641641
retVal = QueryValueEx(_, value)[0]
642-
except Exception:
642+
except:
643643
logger.debug("unable to identify Metasploit installation path via registry key")
644644

645645
return retVal

lib/utils/hash.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ def _bruteProcessVariantA(attack_info, hash_regex, suffix, retVal, proc_id, proc
500500
except (UnicodeEncodeError, UnicodeDecodeError):
501501
pass # ignore possible encoding problems caused by some words in custom dictionaries
502502

503-
except Exception:
503+
except:
504504
warnMsg = "there was a problem while hashing entry: %s. " % repr(word)
505505
warnMsg += "Please report by e-mail to %s" % ML
506506
logger.critical(warnMsg)

0 commit comments

Comments
 (0)