Fix incorrect exception docstrings

This commit is contained in:
Eric Torres 2019-04-14 08:45:17 -07:00
parent 2f94b6821c
commit fe799d867c
4 changed files with 5 additions and 5 deletions

View File

@ -97,7 +97,7 @@ def parse_configfile():
:returns: object used to parse config file :returns: object used to parse config file
:rtype: ConfigParser object :rtype: ConfigParser object
:raises: FileNotFoundError if path does not exist :raises FileNotFoundError: if path does not exist
""" """
if not MAIN_CONFIG_FILE.is_file(): if not MAIN_CONFIG_FILE.is_file():
raise FileNotFoundError(f"{MAIN_CONFIG_FILE} does not exist") raise FileNotFoundError(f"{MAIN_CONFIG_FILE} does not exist")

View File

@ -70,13 +70,13 @@ class PackageManager:
meant to be called from a subclass in a separate module. meant to be called from a subclass in a separate module.
All arguments and keyword-only arguments are passed directly All arguments and keyword-only arguments are passed directly
to the packagemanagerk to the PackageManager object.
:param compress: compression mode :param compress: compression mode
:type compress: str :type compress: str
:returns: the path to the created file :returns: the path to the created file
:rtype: path-like object :rtype: path-like object
:raises: ValueError if compress is not in packagemanager.VALID_DB_COMPRESS_MODES :raises ValueError: if compress is not in packagemanager.VALID_DB_COMPRESS_MODES
""" """
if compress is not None and compress not in VALID_DB_COMPRESS_MODES: if compress is not None and compress not in VALID_DB_COMPRESS_MODES:
raise ValueError(f"{compress} is not a valid compress mode") raise ValueError(f"{compress} is not a valid compress mode")

View File

@ -21,7 +21,7 @@ def rsync(*args):
:param args: all arguments to pass to rsync :param args: all arguments to pass to rsync
:type args: str :type args: str
:raises: subprocess.CalledProcessError if rsync process failed :raises subprocess.CalledProcessError: if rsync process failed
""" """
cmd = [_RSYNC_BIN, *args] cmd = [_RSYNC_BIN, *args]

View File

@ -188,7 +188,7 @@ class Repository(Hierarchy):
:param name: the name of the snapshot :param name: the name of the snapshot
:type name: str :type name: str
:return: Snapshot object :return: Snapshot object
:raises: ValueError if name is an invalid value :raises ValueError: if name is an invalid value
""" """
syslog.debug("Creating snapshot") syslog.debug("Creating snapshot")