Constant names' readability. Thanks, Samuel.

This commit is contained in:
Mattias Põldaru 2012-06-25 17:49:33 +03:00
parent 4917831206
commit 556f28db33
2 changed files with 6 additions and 6 deletions

View File

@ -435,7 +435,7 @@ class StripRtf():
u'writereservhash', u'xe', u'xform', u'xmlattrname', u'xmlattrvalue', u'writereservhash', u'xe', u'xform', u'xmlattrname', u'xmlattrvalue',
u'xmlclose', u'xmlname', u'xmlnstbl', u'xmlopen')) u'xmlclose', u'xmlname', u'xmlnstbl', u'xmlopen'))
# Translation of some special characters. # Translation of some special characters.
SPECIALCHARS = { SPECIAL_CHARS = {
u'par': u'\n', u'par': u'\n',
u'sect': u'\n\n', u'sect': u'\n\n',
# Required page and column break. # Required page and column break.
@ -520,8 +520,8 @@ class StripRtf():
curskip = 0 curskip = 0
if word in self.DESTINATIONS: if word in self.DESTINATIONS:
ignorable = True ignorable = True
elif word in self.SPECIALCHARS: elif word in self.SPECIAL_CHARS:
out.append(self.SPECIALCHARS[word]) out.append(self.SPECIAL_CHARS[word])
elif word == u'uc': elif word == u'uc':
ucskip = int(arg) ucskip = int(arg)
elif word == u' ': elif word == u' ':

View File

@ -42,7 +42,7 @@ class SundayPlusImport(SongImport):
The format examples can be found attached to bug report at The format examples can be found attached to bug report at
<http://support.openlp.org/issues/395> <http://support.openlp.org/issues/395>
""" """
HOTKEYTOVERSETYPE = { HOTKEY_TO_VERSE_TYPE = {
u'1': u'v1', u'1': u'v1',
u'2': u'v2', u'2': u'v2',
u'3': u'v3', u'3': u'v3',
@ -147,8 +147,8 @@ class SundayPlusImport(SongImport):
# Hotkey always appears after MARKER_NAME, so it # Hotkey always appears after MARKER_NAME, so it
# effectively overrides MARKER_NAME, if present. # effectively overrides MARKER_NAME, if present.
if len(value) and \ if len(value) and \
value in self.HOTKEYTOVERSETYPE.keys(): value in self.HOTKEY_TO_VERSE_TYPE.keys():
verse_type = self.HOTKEYTOVERSETYPE[value] verse_type = self.HOTKEY_TO_VERSE_TYPE[value]
if name == 'rtf': if name == 'rtf':
value = self.unescape(value) value = self.unescape(value)
verse = self.rtf.strip_rtf(value, self.encoding) verse = self.rtf.strip_rtf(value, self.encoding)