Mercurial > python-cmd2
changeset 130:64ad2b28d69d
avoid crash when xclip missing
author | catherine@dellzilla |
---|---|
date | Fri, 07 Nov 2008 14:49:32 -0500 |
parents | 1fc93cef06d5 |
children | d94b79807da0 |
files | cmd2.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 '')