diff options
author | bst-marge-bot <marge-bot@buildstream.build> | 2019-10-30 10:47:54 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-10-30 10:47:54 +0000 |
commit | 29099c39f117f27d7fcf301bf89538659b9d12db (patch) | |
tree | d9b86dcc048b4e05cc2672d32edaf8ecf51503d6 | |
parent | 8b5905bcdcc59e8575004a5fde7f2817dd9d01a7 (diff) | |
parent | 252adc3b9c7d3e69071bffa032bc86144a5fbaeb (diff) | |
download | buildstream-29099c39f117f27d7fcf301bf89538659b9d12db.tar.gz |
Merge branch 'aevri/fuse_mount_private' into 'master'
_fuse/mount: make mount() and unmount() private
See merge request BuildStream/buildstream!1674
-rw-r--r-- | src/buildstream/_fuse/mount.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/buildstream/_fuse/mount.py b/src/buildstream/_fuse/mount.py index 52d3ed65a..92ca63179 100644 --- a/src/buildstream/_fuse/mount.py +++ b/src/buildstream/_fuse/mount.py @@ -91,14 +91,14 @@ class Mount(): def __init__(self, fuse_mount_options=None): self._fuse_mount_options = {} if fuse_mount_options is None else fuse_mount_options - # mount(): + # _mount(): # - # User facing API for mounting a fuse subclass implementation + # Mount a fuse subclass implementation. # # Args: # (str): Location to mount this fuse fs # - def mount(self, mountpoint): + def _mount(self, mountpoint): assert self.__process is None @@ -119,11 +119,11 @@ class Mount(): time.sleep(1 / 100) - # unmount(): + # _unmount(): # - # User facing API for unmounting a fuse subclass implementation + # Unmount a fuse subclass implementation. # - def unmount(self): + def _unmount(self): # Terminate child process and join if self.__process is not None: @@ -156,12 +156,12 @@ class Mount(): with utils._tempnamedfile() as logfile: self.__logfile = logfile - self.mount(mountpoint) + self._mount(mountpoint) try: - with _signals.terminator(self.unmount): + with _signals.terminator(self._unmount): yield finally: - self.unmount() + self._unmount() self.__logfile = None |