Skip to content

Commit

Permalink
Merge pull request #96 from balshetzer/master
Browse files Browse the repository at this point in the history
Fix windows version of plover to handle errors on startip
  • Loading branch information
balshetzer committed Jul 6, 2013
2 parents bbb888e + c2d82d2 commit 876fbe2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plover/machine/treal.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def update(self, p):
class Stenotype(StenotypeBase):
def __init__(self, params):
StenotypeBase.__init__(self)
self._machine = None

def start_capture(self):
"""Begin listening for output from the stenotype machine."""
Expand All @@ -70,7 +71,8 @@ def callback(p):

def stop_capture(self):
"""Stop listening for output from the stenotype machine."""
self._machine.close()
if self._machine:
self._machine.close()
self._stopped()

else:
Expand Down

0 comments on commit 876fbe2

Please sign in to comment.