Simple fixes to get layout2layout working with Python 3. These are all that the 2to3 script reported.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37646 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2011-02-14 02:28:13 +00:00
parent 50f845e479
commit e6ec7bdce5

View File

@ -666,7 +666,7 @@ def convert(lines):
# This emulates the hardcoded article style numbering of 1.3
#
if counter != "":
if counters.has_key(style):
if style in counters:
if labelstring_line < 0:
lines.insert(i, '%sLabelString "%s"' % (space1, counters[style]))
i += 1
@ -675,7 +675,7 @@ def convert(lines):
lines[labelstring_line] = re_LabelString.sub(
r'\1\2\3%s' % new_labelstring.replace("\\", "\\\\"),
lines[labelstring_line])
if appendixcounters.has_key(style):
if style in appendixcounters:
if labelstringappendix_line < 0:
lines.insert(i, '%sLabelStringAppendix "%s"' % (space1, appendixcounters[style]))
i += 1
@ -690,7 +690,7 @@ def convert(lines):
i += 1
# Add the TocLevel setting for sectioning styles
if toclevel == "" and toclevels.has_key(style) and maxcounter <= toclevels[style]:
if toclevel == "" and style in toclevels and maxcounter <= toclevels[style]:
lines.insert(i, '%s\tTocLevel %d' % (space1, toclevels[style]))
i += 1