def has_pyfs(): """ Does this environment have pyfs installed? Should return False even when Mercurial's Demand Import allowed import of fs.*. """ with errors.ExceptionRaisedContext() as exc: fs.__name__ return not bool(exc)
def has_keyczar(): with errors.ExceptionRaisedContext() as exc: keyczar.__name__ return not bool(exc)
def viable(cls): with errors.ExceptionRaisedContext() as exc: cls.priority return not bool(exc)