Improve docstrings
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
This commit is contained in:
@@ -59,24 +59,22 @@ class ProgressParser:
|
||||
|
||||
|
||||
class ReadTOCTask(task.Task):
|
||||
"""
|
||||
Task that reads the TOC of the disc using cdrdao
|
||||
"""
|
||||
"""Task that reads the TOC of the disc using cdrdao."""
|
||||
|
||||
description = "Reading TOC"
|
||||
toc = None
|
||||
|
||||
def __init__(self, device, fast_toc=False, toc_path=None):
|
||||
"""
|
||||
Read the TOC for 'device'.
|
||||
Read the TOC for ``device``.
|
||||
|
||||
:param device: block device to read TOC from
|
||||
:type device: str
|
||||
:param fast_toc: If to use fast-toc cdrdao mode
|
||||
:type fast_toc: bool
|
||||
:param toc_path: Where to save TOC if wanted.
|
||||
:type toc_path: str
|
||||
:param device: block device to read TOC from
|
||||
:type device: str
|
||||
:param fast_toc: whether to use fast-toc cdrdao mode
|
||||
:type fast_toc: bool
|
||||
:param toc_path: where to save TOC if wanted
|
||||
:type toc_path: str
|
||||
"""
|
||||
|
||||
self.device = device
|
||||
self.fast_toc = fast_toc
|
||||
self.toc_path = toc_path
|
||||
@@ -161,9 +159,7 @@ class ReadTOCTask(task.Task):
|
||||
|
||||
|
||||
def DetectCdr(device):
|
||||
"""
|
||||
Return whether cdrdao detects a CD-R for 'device'.
|
||||
"""
|
||||
"""Whether cdrdao detects a CD-R for ``device``."""
|
||||
cmd = [CDRDAO, 'disk-info', '-v1', '--device', device]
|
||||
logger.debug("executing %r", cmd)
|
||||
p = Popen(cmd, stdout=PIPE, stderr=PIPE)
|
||||
@@ -171,9 +167,7 @@ def DetectCdr(device):
|
||||
|
||||
|
||||
def version():
|
||||
"""
|
||||
Return cdrdao version as a string.
|
||||
"""
|
||||
"""Return cdrdao version as a string."""
|
||||
cdrdao = Popen(CDRDAO, stderr=PIPE)
|
||||
_, err = cdrdao.communicate()
|
||||
if cdrdao.returncode != 1:
|
||||
|
||||
Reference in New Issue
Block a user