Remove dead code from program.getFastToc
The caching mechanism didn's have any effect. The inline function 'function' wasn't used anymore.
This commit is contained in:
@@ -90,23 +90,16 @@ class Program:
|
|||||||
os.chdir(workingDirectory)
|
os.chdir(workingDirectory)
|
||||||
|
|
||||||
def getFastToc(self, runner, device):
|
def getFastToc(self, runner, device):
|
||||||
"""Retrieve the normal TOC table from a toc pickle or the drive.
|
"""Retrieve the normal TOC table from the drive.
|
||||||
Also retrieves the cdrdao version
|
Also warn about buggy cdrdao versions.
|
||||||
"""
|
"""
|
||||||
def function(r, t):
|
from pkg_resources import parse_version as V
|
||||||
r.run(t)
|
version = cdrdao.getCDRDAOVersion()
|
||||||
|
if V(version) < V('1.2.3rc2'):
|
||||||
ptoc = cache.Persister()
|
sys.stdout.write('Warning: cdrdao older than 1.2.3 has a '
|
||||||
if not ptoc.object:
|
'pre-gap length bug.\n'
|
||||||
from pkg_resources import parse_version as V
|
'See http://sourceforge.net/tracker/?func=detail&aid=604751&group_id=2171&atid=102171\n') # noqa: E501
|
||||||
version = cdrdao.getCDRDAOVersion()
|
toc = cdrdao.ReadTOCTask(device).table
|
||||||
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
|
|
||||||
assert toc.hasTOC()
|
assert toc.hasTOC()
|
||||||
return toc
|
return toc
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user