# HG changeset patch # User catherine.devlin@gmail.com # Date 1296652521 18000 # Node ID fd8a2da973cbd52b96e63ab7f5be2c453352443b # Parent b5f904daae8340cf3e62ca8acb927cdfe7241e5b generalizing xclip error trap diff -r b5f904daae83 -r fd8a2da973cb cmd2.py --- 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():