From 0ed75b4909ef07ee87344d700b565667bc7e8c2a Mon Sep 17 00:00:00 2001 From: catherine Date: Mon, 19 May 2008 10:08:23 -0400 Subject: fixed err in python 2.4 xclip detection --- cmd2.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cmd2.py') diff --git a/cmd2.py b/cmd2.py index d49ef65..ae01fac 100755 --- a/cmd2.py +++ b/cmd2.py @@ -101,8 +101,11 @@ else: can_clip = True except AttributeError: # check_call not defined, Python < 2.5 teststring = 'Testing for presence of xclip.' - xclipproc = subprocess.check_call('xclip -sel clip', shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE) + #import pdb; pdb.set_trace() + xclipproc = subprocess.Popen('xclip -sel clip', shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE) xclipproc.stdin.write(teststring) + xclipproc.stdin.close() + xclipproc = subprocess.Popen('xclip -o -sel clip', shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE) if xclipproc.stdout.read() == teststring: can_clip = True except (subprocess.CalledProcessError, OSError): -- cgit v1.2.1