Пример #1
0
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)
Пример #2
0
def has_keyczar():
    with errors.ExceptionRaisedContext() as exc:
        keyczar.__name__
    return not bool(exc)
Пример #3
0
 def viable(cls):
     with errors.ExceptionRaisedContext() as exc:
         cls.priority
     return not bool(exc)