mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-07-13 14:05:47 +00:00
docstrings everywhere
This commit is contained in:
@ -23,13 +23,26 @@ from ahriman.core.util import check_output
|
||||
|
||||
|
||||
class Rsync(Uploader):
|
||||
'''
|
||||
rsync wrapper
|
||||
:ivar remote: remote address to sync
|
||||
'''
|
||||
|
||||
def __init__(self, architecture: str, config: Configuration) -> None:
|
||||
'''
|
||||
default constructor
|
||||
:param architecture: repository architecture
|
||||
:param config: configuration instance
|
||||
'''
|
||||
Uploader.__init__(self, architecture, config)
|
||||
section = config.get_section_name('rsync', architecture)
|
||||
self.remote = config.get(section, 'remote')
|
||||
|
||||
def sync(self, path: str) -> None:
|
||||
'''
|
||||
sync data to remote server
|
||||
:param path: local path to sync
|
||||
'''
|
||||
check_output('rsync', '--archive', '--verbose', '--compress', '--partial', '--progress', '--delete', path, self.remote,
|
||||
exception=None,
|
||||
logger=self.logger)
|
||||
|
Reference in New Issue
Block a user