Convert docstrings to reStructuredText
This commit also includes: - whitespace / code formatting fixes - slight syntax related changes: except <exception_name>, e -> except <exception_name> as e - 3 pointless instructions instances have been rewritten [sorted] (spotted by semi-automatic check) The unrelated changes shouldn't have any real impact on whipper's behaviour.
This commit is contained in:
@@ -5,27 +5,34 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def eject_device(device):
|
||||
"""
|
||||
Eject the given device.
|
||||
"""Eject the given device.
|
||||
|
||||
:param device: optical disk drive.
|
||||
:type device:
|
||||
"""
|
||||
logger.debug("ejecting device %s", device)
|
||||
os.system('eject %s' % device)
|
||||
|
||||
|
||||
def load_device(device):
|
||||
"""
|
||||
Load the given device.
|
||||
"""Load the given device.
|
||||
|
||||
:param device: optical disk drive.
|
||||
:type device:
|
||||
"""
|
||||
logger.debug("loading (eject -t) device %s", device)
|
||||
os.system('eject -t %s' % device)
|
||||
|
||||
|
||||
def unmount_device(device):
|
||||
"""
|
||||
Unmount the given device if it is mounted, as happens with automounted
|
||||
data tracks.
|
||||
"""Unmount the given device if it is mounted.
|
||||
|
||||
Data tracks are usually automounted.
|
||||
|
||||
If the given device is a symlink, the target will be checked.
|
||||
|
||||
:param device: optical disk drive.
|
||||
:type device:
|
||||
"""
|
||||
device = os.path.realpath(device)
|
||||
logger.debug('possibly unmount real path %r' % device)
|
||||
|
||||
Reference in New Issue
Block a user