Mercurial > gnulib
changeset 39061:7bcbc023e2da
vfs: base VFS __enter__ and __exit__ methods
author | Dmitry Selyutin <ghostmansd@gmail.com> |
---|---|
date | Sun, 22 Oct 2017 23:46:08 +0300 |
parents | e68acd5236e9 |
children | 6f57acb28286 |
files | pygnulib/vfs.py |
diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/pygnulib/vfs.py Sun Oct 22 23:25:39 2017 +0300 +++ b/pygnulib/vfs.py Sun Oct 22 23:46:08 2017 +0300 @@ -35,6 +35,14 @@ return "{}.{}{{{}}}".format(module, name, repr(self.__prefix)) + def __enter__(self): + return self + + + def __exit__(self, exctype, excval, exctrace): + pass + + def __contains__(self, name): path = _os.path.normpath(name) if _os.path.isabs(name): @@ -247,14 +255,6 @@ raise TypeError("{} is not a gnulib repository".format(prefix)) - def __enter__(self): - return self - - - def __exit__(self, exctype, excval, exctrace): - pass - - def module(self, name, full=True): """obtain gnulib module by name""" _type_assert("name", name, str)