Skip to content

Commit

Permalink
Fix recording KeyboardInterrupt error on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
rmmbear committed Apr 2, 2017
1 parent 7234e73 commit 6b02e64
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions helper/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,9 +795,14 @@ def record_start(device, name=None, stdout_=sys.stdout):
except KeyboardInterrupt:
pass
stdout_.write("\nRecording stopped.\n")
# we're waiting for the clip to be fully saved to device's storage
# there must be a better way of doing this...
sleep(1)
# for some reason on Windows the try block above is not enough
# an odd fix for an odd error
try:
# we're waiting for the clip to be fully saved to device's storage
# there must be a better way of doing this...
sleep(1)
except KeyboardInterrupt:
sleep(1)
return remote_recording


Expand Down

0 comments on commit 6b02e64

Please sign in to comment.