Commit 596584c2 authored by Jérome Perrin's avatar Jérome Perrin Committed by Arnaud Fontaine

corporate_identity: pylint on py3

parent 6f513dbd
......@@ -85,7 +85,7 @@ book_version = html_quote(override_document_version) if override_document_versio
book_description = html_quote(override_document_description) if override_document_description else book.getDescription()
book_title = html_quote(override_document_title) if override_document_title else book.getTitle()
if six.PY2 and isinstance(book_content, unicode):
if six.PY2 and isinstance(book_content, six.text_type):
book_content = book_content.encode("UTF-8")
# backcompat
......
......@@ -37,7 +37,7 @@ contract_version = context.getVersion() or "001"
contract_description = context.getDescription()
contract_title = context.getTitle()
if six.PY2 and isinstance(contract_content, unicode):
if six.PY2 and isinstance(contract_content, six.text_type):
contract_content = contract_content.encode("UTF-8")
contract_history_section_list = re.findall('<section.+?>.+?</section>', contract_content, re.S)
......
......@@ -149,9 +149,9 @@ if leaflet_display_side:
#leaflet_content = leaflet_legalese.decode() + leaflet_content.decode()
if six.PY2:
if isinstance(leaflet_legalese, unicode):
if isinstance(leaflet_legalese, six.text_type):
leaflet_legalese = leaflet_legalese.encode("UTF-8")
if isinstance(leaflet_content, unicode):
if isinstance(leaflet_content, six.text_type):
leaflet_content = leaflet_content.encode("UTF-8")
leaflet_content = leaflet_legalese + leaflet_content
......
......@@ -140,9 +140,9 @@ if release_display_about:
)
#release_content = release_content.decode() + release_about.decode()
if six.PY2:
if isinstance(release_content, unicode):
if isinstance(release_content, six.text_type):
release_content = release_content.encode("UTF-8")
if isinstance(release_about, unicode):
if isinstance(release_about, six.text_type):
release_about = release_about.encode("UTF-8")
release_content = release_content + release_about
......
......@@ -71,24 +71,8 @@ if portal_type == 'Web Page':
if portal_type == 'Web Section':
websection = context
return generateOpenGraphParamaters(websection)
"""
default_document = websection.getDefaultDocumentValue()
if default_document is not None:
return generateOpenGraphParamaters(default_document, True)
else:
return generateOpenGraphParamaters(websection)
"""
if portal_type == 'Web Site':
return generateOpenGraphParamaters(website)
"""
default_document = website.getDefaultDocumentValue()
if default_document is not None:
return generateOpenGraphParamaters(default_document, True)
else:
return generateOpenGraphParamaters(website)
"""
return ''
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment