mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-22 06:13:19 -07:00
Remove six.iteritems
This commit is contained in:
parent
6be2e12dd6
commit
28166e035d
3 changed files with 7 additions and 9 deletions
|
@ -14,7 +14,6 @@ import requests
|
||||||
from requests_oauthlib import OAuth2Session
|
from requests_oauthlib import OAuth2Session
|
||||||
|
|
||||||
import six
|
import six
|
||||||
from six import iteritems
|
|
||||||
|
|
||||||
|
|
||||||
class InitSickBeard:
|
class InitSickBeard:
|
||||||
|
@ -270,7 +269,7 @@ class InitSickBeard:
|
||||||
for param in rem_params:
|
for param in rem_params:
|
||||||
params.pop(param)
|
params.pop(param)
|
||||||
|
|
||||||
for fork in sorted(iteritems(core.FORKS), reverse=False):
|
for fork in sorted(core.FORKS, reverse=False):
|
||||||
if params == fork[1]:
|
if params == fork[1]:
|
||||||
detected = True
|
detected = True
|
||||||
break
|
break
|
||||||
|
|
|
@ -4,7 +4,6 @@ import shutil
|
||||||
from itertools import chain
|
from itertools import chain
|
||||||
|
|
||||||
import configobj
|
import configobj
|
||||||
from six import iteritems
|
|
||||||
|
|
||||||
import core
|
import core
|
||||||
from core import logger
|
from core import logger
|
||||||
|
@ -161,7 +160,7 @@ class ConfigObj(configobj.ConfigObj, Section):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
def cleanup_values(values, section):
|
def cleanup_values(values, section):
|
||||||
for option, value in iteritems(values):
|
for option, value in values.items():
|
||||||
if section in ['CouchPotato']:
|
if section in ['CouchPotato']:
|
||||||
if option == ['outputDirectory']:
|
if option == ['outputDirectory']:
|
||||||
CFG_NEW['Torrent'][option] = os.path.split(os.path.normpath(value))[0]
|
CFG_NEW['Torrent'][option] = os.path.split(os.path.normpath(value))[0]
|
||||||
|
@ -242,7 +241,7 @@ class ConfigObj(configobj.ConfigObj, Section):
|
||||||
subsection = None
|
subsection = None
|
||||||
if section in list(chain.from_iterable(subsections.values())):
|
if section in list(chain.from_iterable(subsections.values())):
|
||||||
subsection = section
|
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)
|
process_section(section, subsection)
|
||||||
elif section in subsections.keys():
|
elif section in subsections.keys():
|
||||||
subsection = subsections[section]
|
subsection = subsections[section]
|
||||||
|
@ -252,7 +251,7 @@ class ConfigObj(configobj.ConfigObj, Section):
|
||||||
|
|
||||||
# migrate SiCRKAGE settings from SickBeard section to new dedicated SiCRKAGE 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':
|
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']:
|
if option in CFG_NEW['SiCKRAGE']['tv']:
|
||||||
CFG_NEW['SiCKRAGE']['tv'][option] = value
|
CFG_NEW['SiCKRAGE']['tv'][option] = value
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from babelfish import Language
|
from babelfish import Language
|
||||||
from six import iteritems, string_types
|
from six import string_types
|
||||||
|
|
||||||
import core
|
import core
|
||||||
from core import logger
|
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'
|
core.VEXTENSION = '-transcoded{ext}'.format(ext=core.VEXTENSION) # adds '-transcoded.ext'
|
||||||
new_file = file
|
new_file = file
|
||||||
else:
|
else:
|
||||||
img, data = next(iteritems(file))
|
img, data = next(file.items())
|
||||||
name = data['name']
|
name = data['name']
|
||||||
new_file = []
|
new_file = []
|
||||||
rem_vid = []
|
rem_vid = []
|
||||||
|
@ -926,7 +926,7 @@ def transcode_directory(dir_name):
|
||||||
if isinstance(file, string_types):
|
if isinstance(file, string_types):
|
||||||
proc = subprocess.Popen(command, stdout=bitbucket, stderr=subprocess.PIPE)
|
proc = subprocess.Popen(command, stdout=bitbucket, stderr=subprocess.PIPE)
|
||||||
else:
|
else:
|
||||||
img, data = next(iteritems(file))
|
img, data = next(file.items())
|
||||||
proc = subprocess.Popen(command, stdout=bitbucket, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
|
proc = subprocess.Popen(command, stdout=bitbucket, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
|
||||||
for vob in data['files']:
|
for vob in data['files']:
|
||||||
procin = zip_out(vob, img, bitbucket)
|
procin = zip_out(vob, img, bitbucket)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue