Permalink
Browse files

Remove assert abuse. (Issue #12)

Signed-off-by: Jack Miller <jack@codezen.org>
  • Loading branch information...
themoken committed Jul 20, 2010
1 parent 15813ad commit 00aa79b42e0eab226de6266b3d3d546d06c84943
Showing with 3 additions and 2 deletions.
  1. +3 −2 canto/extra.py
View
@@ -276,8 +276,9 @@ def yank(gui):
try:
xclip.stdin.write(gui.sel["item"]["link"])
xclip.stdin.close()
- assert xclip.wait() == 0
- except (IOError, AssertionError):
+ if xclip.wait() != 0:
+ raise IOError
+ except IOError:
gui.cfg.log("xclip must be installed for yank to work!")
else:
gui.cfg.log("Yanked: %s" % gui.sel["item"]["title"])

0 comments on commit 00aa79b

Please sign in to comment.