mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 04:31:30 +00:00
Minor improvement for _mac_wav_play
This commit is contained in:
@@ -18,7 +18,7 @@ def beep():
|
||||
if sys.platform.startswith("win"):
|
||||
_win_wav_play(BEEP_WAV_FILENAME)
|
||||
elif sys.platform.startswith("darwin"):
|
||||
_mac_beep()
|
||||
_mac_wav_play(BEEP_WAV_FILENAME)
|
||||
elif sys.platform.startswith("cygwin"):
|
||||
_cygwin_beep(BEEP_WAV_FILENAME)
|
||||
elif any(sys.platform.startswith(_) for _ in ("linux", "freebsd")):
|
||||
@@ -40,9 +40,8 @@ def _speaker_beep():
|
||||
def _cygwin_beep(filename):
|
||||
os.system("play-sound-file '%s' 2>/dev/null" % filename)
|
||||
|
||||
def _mac_beep():
|
||||
import Carbon.Snd
|
||||
Carbon.Snd.SysBeep(1)
|
||||
def _mac_wav_play(filename):
|
||||
os.system("afplay '%s' 2>/dev/null" % BEEP_WAV_FILENAME)
|
||||
|
||||
def _win_wav_play(filename):
|
||||
import winsound
|
||||
|
||||
Reference in New Issue
Block a user