Fix next in Python 3

In Python 3 `obj.next` is renamed to `obj.__next__` and should be
called with the `next` builtin.
This commit is contained in:
Labrys of Knossos 2018-12-15 18:12:35 -05:00
parent 943bdc9320
commit 4ee656f22c

View file

@ -134,7 +134,7 @@ def buildCommands(file, newDir, movieName, bitbucket):
if ext == core.VEXTENSION and newDir == dir: # we need to change the name to prevent overwriting itself.
core.VEXTENSION = '-transcoded{ext}'.format(ext=core.VEXTENSION) # adds '-transcoded.ext'
else:
img, data = iteritems(file).next()
img, data = next(iteritems(file))
name = data['name']
video_details, result = getVideoDetails(data['files'][0], img, bitbucket)
inputFile = '-'
@ -775,7 +775,7 @@ def Transcode_directory(dirName):
if isinstance(file, basestring):
proc = subprocess.Popen(command, stdout=bitbucket, stderr=bitbucket)
else:
img, data = iteritems(file).next()
img, data = next(iteritems(file))
proc = subprocess.Popen(command, stdout=bitbucket, stderr=bitbucket, stdin=subprocess.PIPE)
for vob in data['files']:
procin = zip_out(vob, img, bitbucket)