summaryrefslogtreecommitdiff
path: root/cmd2.py
diff options
context:
space:
mode:
authorCatherine Devlin <catherine.devlin@gmail.com>2010-09-07 07:25:49 -0400
committerCatherine Devlin <catherine.devlin@gmail.com>2010-09-07 07:25:49 -0400
commitcd87ea82752ad392cdd8bf9d9f4bb1c7b72a29ef (patch)
tree3936de955c70aed1e392156124f9cc9c168032aa /cmd2.py
parent4c5485cd590e00b25d9c68a6530f7637ad9efb63 (diff)
downloadcmd2-git-cd87ea82752ad392cdd8bf9d9f4bb1c7b72a29ef.tar.gz
swallow xclip error
Diffstat (limited to 'cmd2.py')
-rwxr-xr-xcmd2.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd2.py b/cmd2.py
index 96edb202..3611e42a 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -187,7 +187,7 @@ if subprocess.mswindows:
else:
can_clip = False
try:
- subprocess.check_call('xclip -o -sel clip', shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE)
+ subprocess.check_call('xclip -o -sel clip', shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE)
can_clip = True
except AttributeError: # check_call not defined, Python < 2.5
teststring = 'Testing for presence of xclip.'
@@ -651,7 +651,6 @@ class Cmd(cmd.Cmd):
- terminator: ['\n', '\n']
- terminator: ['\n', '\n']
'''
- tstr = 'multiline command /* with comment complete */ is done;'
outputParser = (pyparsing.Literal('>>') | (pyparsing.WordStart() + '>') | pyparsing.Regex('[^=]>'))('output')
terminatorParser = pyparsing.Or([(hasattr(t, 'parseString') and t) or pyparsing.Literal(t) for t in self.terminators])('terminator')