Mercurial > python-cmd2
diff cmd2.py @ 130:64ad2b28d69d
avoid crash when xclip missing
author | catherine@dellzilla |
---|---|
date | Fri, 07 Nov 2008 14:49:32 -0500 |
parents | 8def9dec155f |
children | d94b79807da0 |
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 '')