Revert "Fix import error in pyhton 2.6."
This reverts commit f6a78cb4b2.
This commit is contained in:
parent
574b23f1ef
commit
a10a4b0af4
1 changed files with 2 additions and 7 deletions
|
|
@ -22,15 +22,10 @@ import re
|
|||
import sys
|
||||
import logging
|
||||
import zipfile
|
||||
from collections import OrderedDict
|
||||
from xml.dom.minidom import parseString
|
||||
from jinja2 import Environment, Undefined
|
||||
|
||||
try:
|
||||
from collections import OrderedDict
|
||||
except ImportError:
|
||||
# Its python 2.6
|
||||
pass
|
||||
|
||||
# Test python versions and normalize calls to basestring, unicode, etc.
|
||||
try:
|
||||
unicode = unicode
|
||||
|
|
@ -308,7 +303,7 @@ class Renderer(object):
|
|||
def _encode_escape_chars(self, xml_text):
|
||||
if sys.version_info >= (2, 7):
|
||||
encode_rules = OrderedDict()
|
||||
|
||||
|
||||
encode_rules = {
|
||||
'(?i)(<text:(?:[ahp]|ruby-base|span|meta|meta-field)>.*)(\n)(.*</text:(?:[ahp]|ruby-base|span|meta|meta-field)>)': r'\1<text:line-break/>\3',
|
||||
'(?i)(<text:(?:[ahp]|ruby-base|span|meta|meta-field)>.*)(\u0009)(.*</text:(?:[ahp]|ruby-base|span|meta|meta-field)>)': r'\1<text:tab>\3',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue