Skip to content

Commit

Permalink
Rename init to init_backend
Browse files Browse the repository at this point in the history
To avoid confusion with __init__
  • Loading branch information
daviewales committed Jan 8, 2025
1 parent b31d514 commit 1dbe050
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion common/gocryptfstools.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _mount(self):
raise MountException(_('Can\'t mount \'%(command)s\':\n\n%(error)s') \
% {'command': ' '.join(gocryptfs), 'error': output})

def init(self):
def init_backend(self):
"""
init the cipher path
"""
Expand Down
8 changes: 4 additions & 4 deletions common/mount.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,9 @@ def isConfigured(self, mode = None, **kwargs):
**kwargs)
return backend.isConfigured()

def init(self, mode = None, **kwargs):
def init_backend(self, mode = None, **kwargs):
"""
High-level init. Run :py:func:`MountControl.init` to initiate
High-level init. Run :py:func:`MountControl.init_backend` to initiate
the backend if not configured yet.
Args:
Expand All @@ -419,7 +419,7 @@ def init(self, mode = None, **kwargs):
:py:class:`MountControl` subclass backend
Raises:
exceptions.MountException: if init failed
exceptions.MountException: if init_backend failed
"""
if mode is None:
mode = self.config.snapshotsMode(self.profile_id)
Expand All @@ -435,7 +435,7 @@ def init(self, mode = None, **kwargs):
mode = mode,
parent = self.parent,
**kwargs)
return backend.init()
return backend.init_backend()

class MountControl:
"""This is the low-level mount API. This should be subclassed by backends.
Expand Down

0 comments on commit 1dbe050

Please sign in to comment.