Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dead code from program.getFastToc #264

Merged
merged 1 commit into from
May 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 9 additions & 16 deletions whipper/common/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,16 @@ def setWorkingDirectory(self, workingDirectory):
os.chdir(workingDirectory)

def getFastToc(self, runner, device):
"""Retrieve the normal TOC table from a toc pickle or the drive.
Also retrieves the cdrdao version
"""Retrieve the normal TOC table from the drive.
Also warn about buggy cdrdao versions.
"""
def function(r, t):
r.run(t)

ptoc = cache.Persister()
if not ptoc.object:
from pkg_resources import parse_version as V
version = cdrdao.getCDRDAOVersion()
if V(version) < V('1.2.3rc2'):
sys.stdout.write('Warning: cdrdao older than 1.2.3 has a '
'pre-gap length bug.\n'
'See http://sourceforge.net/tracker/?func=detail&aid=604751&group_id=2171&atid=102171\n') # noqa: E501
t = cdrdao.ReadTOCTask(device)
ptoc.persist(t.table)
toc = ptoc.object
from pkg_resources import parse_version as V
version = cdrdao.getCDRDAOVersion()
if V(version) < V('1.2.3rc2'):
sys.stdout.write('Warning: cdrdao older than 1.2.3 has a '
'pre-gap length bug.\n'
'See http://sourceforge.net/tracker/?func=detail&aid=604751&group_id=2171&atid=102171\n') # noqa: E501
toc = cdrdao.ReadTOCTask(device).table
assert toc.hasTOC()
return toc

Expand Down