Remove six.iteritems

This commit is contained in:
Labrys of Knossos 2022-12-03 01:16:25 -05:00
commit 2e92d9baaa
3 changed files with 7 additions and 9 deletions

View file

@ -14,7 +14,6 @@ import requests
from requests_oauthlib import OAuth2Session
import six
from six import iteritems
class InitSickBeard:
@ -270,7 +269,7 @@ class InitSickBeard:
for param in rem_params:
params.pop(param)
for fork in sorted(iteritems(core.FORKS), reverse=False):
for fork in sorted(core.FORKS, reverse=False):
if params == fork[1]:
detected = True
break

View file

@ -4,7 +4,6 @@ import shutil
from itertools import chain
import configobj
from six import iteritems
import core
from core import logger
@ -161,7 +160,7 @@ class ConfigObj(configobj.ConfigObj, Section):
continue
def cleanup_values(values, section):
for option, value in iteritems(values):
for option, value in values.items():
if section in ['CouchPotato']:
if option == ['outputDirectory']:
CFG_NEW['Torrent'][option] = os.path.split(os.path.normpath(value))[0]
@ -242,7 +241,7 @@ class ConfigObj(configobj.ConfigObj, Section):
subsection = None
if section in list(chain.from_iterable(subsections.values())):
subsection = section
section = ''.join([k for k, v in iteritems(subsections) if subsection in v])
section = ''.join([k for k, v in subsections.items() if subsection in v])
process_section(section, subsection)
elif section in subsections.keys():
subsection = subsections[section]
@ -252,7 +251,7 @@ class ConfigObj(configobj.ConfigObj, Section):
# migrate SiCRKAGE settings from SickBeard section to new dedicated SiCRKAGE section
if CFG_OLD['SickBeard']['tv']['enabled'] and CFG_OLD['SickBeard']['tv']['fork'] == 'sickrage-api':
for option, value in iteritems(CFG_OLD['SickBeard']['tv']):
for option, value in CFG_OLD['SickBeard']['tv'].items():
if option in CFG_NEW['SiCKRAGE']['tv']:
CFG_NEW['SiCKRAGE']['tv'][option] = value

View file

@ -9,7 +9,7 @@ import shutil
import subprocess
from babelfish import Language
from six import iteritems, string_types
from six import string_types
import core
from core import logger
@ -155,7 +155,7 @@ def build_commands(file, new_dir, movie_name, bitbucket):
core.VEXTENSION = '-transcoded{ext}'.format(ext=core.VEXTENSION) # adds '-transcoded.ext'
new_file = file
else:
img, data = next(iteritems(file))
img, data = next(file.items())
name = data['name']
new_file = []
rem_vid = []
@ -926,7 +926,7 @@ def transcode_directory(dir_name):
if isinstance(file, string_types):
proc = subprocess.Popen(command, stdout=bitbucket, stderr=subprocess.PIPE)
else:
img, data = next(iteritems(file))
img, data = next(file.items())
proc = subprocess.Popen(command, stdout=bitbucket, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
for vob in data['files']:
procin = zip_out(vob, img, bitbucket)