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:
JoeLametta
2018-01-06 08:00:00 +00:00
parent 74e3f7b77d
commit 3b1bd242d0
32 changed files with 1069 additions and 722 deletions

View File

@@ -119,7 +119,7 @@ CD in the AccurateRip database."""
sys.stdout.write('Trying read offset %d ...\n' % offset)
try:
archecksums = self._arcs(runner, table, 1, offset)
except task.TaskException, e:
except task.TaskException as e:
# let MissingDependency fall through
if isinstance(e.exception,
@@ -152,7 +152,7 @@ CD in the AccurateRip database."""
for track in range(2, (len(table.tracks) + 1) - 1):
try:
archecksums = self._arcs(runner, table, track, offset)
except task.TaskException, e:
except task.TaskException as e:
if isinstance(e.exception, cdparanoia.FileSizeError):
sys.stdout.write(
'WARNING: cannot rip with offset %d...\n' %
@@ -195,11 +195,11 @@ CD in the AccurateRip database."""
runner.run(t)
v1 = arc.accuraterip_checksum(
path, track, len(table.tracks), wave=True, v2=False
)
path, track, len(table.tracks), wave=True, v2=False
)
v2 = arc.accuraterip_checksum(
path, track, len(table.tracks), wave=True, v2=True
)
path, track, len(table.tracks), wave=True, v2=True
)
os.unlink(path)
return ("%08x" % v1, "%08x" % v2)