Mercurial > python-cmd2
diff cmd2.py @ 419:fd8a2da973cb
generalizing xclip error trap
author | catherine.devlin@gmail.com |
---|---|
date | Wed, 02 Feb 2011 08:15:21 -0500 |
parents | b5f904daae83 |
children | b6beae2a2f46 |
line wrap: on
line diff
--- a/cmd2.py Wed Feb 02 08:13:03 2011 -0500 +++ b/cmd2.py Wed Feb 02 08:15:21 2011 -0500 @@ -197,7 +197,7 @@ 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, IOError): + except Exception: # hate a bare Exception call, but exception classes vary too much b/t stdlib versions pass if can_clip: def get_paste_buffer():