From: wking Date: Thu, 25 Jun 2009 21:10:57 +0000 (-0400) Subject: Fixed libbe.rcs.RCS.installed to handle missing backend binary. X-Git-Tag: 1.0.0~68^2~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3cc479535865e3e1948ce8812f12e1d0a34031c8;p=be.git Fixed libbe.rcs.RCS.installed to handle missing backend binary. This makes all the failed tests understandable, since they all crash with strings like: AssertionError: Arch RCS not found Which makes more sense than spitting out the raw CommandError. It also means that installed_rcs() actually works now ;). --- diff --git a/libbe/rcs.py b/libbe/rcs.py index c0b92e7..3428ce0 100644 --- a/libbe/rcs.py +++ b/libbe/rcs.py @@ -40,8 +40,7 @@ def _get_matching_rcs(matchfn): rcs = module.new() if matchfn(rcs) == True: return rcs - else: - del(rcs) + del(rcs) return RCS() def rcs_by_name(rcs_name): @@ -205,7 +204,8 @@ class RCS(object): except OSError, e: if e.errno == errno.ENOENT: return False - raise e + except CommandError: + return False def detect(self, path="."): """ Detect whether a directory is revision controlled with this RCS.