Skip to content

Commit

Permalink
hotkey exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
k3it committed Nov 18, 2017
1 parent 9242ffd commit 7c47a61
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Qsorder/qsorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,14 @@ def manual_dump():
print("QSO:", datetime.datetime.utcnow().strftime("%m-%d %H:%M:%S"), "HOTKEY pressed")
dump_audio("HOTKEY", "AUDIO", "RF", 0, datetime.datetime.utcnow(), 73, 2)


def hotkey():
if nopyhk:
return
# add hotkey
print('control', 'alt', HOTKEY.lower())
keyboard.add_hotkey('ctrl+alt+' + HOTKEY.lower(), manual_dump)
try:
keyboard.add_hotkey('ctrl+alt+' + HOTKEY.lower(), manual_dump)
except:
nopyhk = True

def get_free_space_mb(folder):
""" Return folder/drive free space (in bytes)
Expand Down

0 comments on commit 7c47a61

Please sign in to comment.