# HG changeset patch # User catherine@dellzilla # Date 1226087372 18000 # Node ID 64ad2b28d69de23274e64bd6176cdf8cfaaa46fa # Parent 1fc93cef06d508e9782c9cc87248bb4e08a1c1eb avoid crash when xclip missing diff -r 1fc93cef06d5 -r 64ad2b28d69d cmd2.py --- a/cmd2.py Fri Nov 07 10:42:43 2008 -0500 +++ b/cmd2.py Fri Nov 07 14:49:32 2008 -0500 @@ -342,7 +342,10 @@ if statekeeper: if statement.output and not statement.outputTo: self.stdout.seek(0) - writeToPasteBuffer(self.stdout.read()) + try: + writeToPasteBuffer(self.stdout.read()) + except Exception, e: + print str(e) elif statement.pipe: for result in redirect.communicate(): statekeeper.stdout.write(result or '')