コード例 #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
ファイル: keyczar.py プロジェクト: aminba90/PythonCourse
def has_keyczar():
    with errors.ExceptionRaisedContext() as exc:
        keyczar.__name__
    return not bool(exc)
コード例 #3
0
ファイル: backend.py プロジェクト: beckastar/cleaner_markov
 def viable(cls):
     with errors.ExceptionRaisedContext() as exc:
         cls.priority
     return not bool(exc)