changeset 395:9f9c69fbb78f

swallow xclip error
author catherine.devlin@gmail.com
date Tue, 07 Sep 2010 07:25:49 -0400
parents fbd780b5994b
children e60e2c15f026
files cmd2.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/cmd2.py	Wed Jul 07 19:27:21 2010 -0400
+++ b/cmd2.py	Tue Sep 07 07:25:49 2010 -0400
@@ -187,7 +187,7 @@
 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 @@
           - 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')