Skip to content

Commit

Permalink
pep8 and Also capture signal.SIGINT Resolves #28
Browse files Browse the repository at this point in the history
  • Loading branch information
pcottle committed May 8, 2015
1 parent af3db8a commit 79b3d25
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/screenControl.py
Expand Up @@ -10,6 +10,14 @@
import sys
import output
import processInput
import signal
import sys

def signal_handler(signal, frame):
# from http://stackoverflow.com/a/1112350/948126
# Lets just quit rather than signal.SIGINT printing the stack
sys.exit(0)
signal.signal(signal.SIGINT, signal_handler)

import logger

Expand Down
2 changes: 1 addition & 1 deletion src/test.py
Expand Up @@ -164,7 +164,7 @@ def testPrependDir(self):
result = parse.prependDir(inFile)
expected = testCase['out']
if inFile[0:2] == '~/':
expected = os.path.expanduser(expected)
expected = os.path.expanduser(expected)

self.assertEqual(expected, result)
print 'Tested %d dir cases.' % len(prependDirTestCases)
Expand Down

0 comments on commit 79b3d25

Please sign in to comment.