revert accidental 20685 regression (iteritems)

svn: r20987
This commit is contained in:
Paul Franklin 2013-01-04 22:57:40 +00:00
parent 57dc4c0118
commit 30173f5910

View File

@ -34,7 +34,6 @@ Report option handling, including saving and parsing.
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import os import os
import sys
import copy import copy
from xml.sax.saxutils import escape from xml.sax.saxutils import escape
@ -909,31 +908,17 @@ class DocOptionHandler(_options.OptionHandler):
# First we set options_dict values based on the saved options # First we set options_dict values based on the saved options
options = self.saved_option_list.get_options() options = self.saved_option_list.get_options()
docgen_names = self.option_list_collection.docgen_names docgen_names = self.option_list_collection.docgen_names
if sys.version_info[0] >= 3: for option_name, option_data in options.items():
for option_name, option_data in options.items(): if ( option_name in self.options_dict and
if ( option_name in self.options_dict and isinstance(option_data, list) and
isinstance(option_data, list) and option_data and
option_data and option_data[0] in docgen_names ):
option_data[0] in docgen_names ): try:
try: converter = get_type_converter(
converter = get_type_converter( self.options_dict[option_name])
self.options_dict[option_name]) self.options_dict[option_name] = converter(option_data[1])
self.options_dict[option_name] = converter(option_data[1]) except (TypeError, ValueError):
except (TypeError, ValueError): pass
pass
if sys.version_info[0] < 3:
for option_name, option_data in options.iteritems():
if ( option_name in self.options_dict and
isinstance(option_data, list) and
option_data and
option_data[0] in docgen_names ):
try:
converter = get_type_converter(
self.options_dict[option_name])
self.options_dict[option_name] = converter(option_data[1])
except (TypeError, ValueError):
pass
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# #