Commit c7593632 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Apply 2to3 converter to controllers.

parent 52162649
# -*- coding: utf-8 -*-
""" Controllers for building graphs using pandas library """ Controllers for building graphs using pandas library
""" """
......
...@@ -168,7 +168,7 @@ def edit_insert(): ...@@ -168,7 +168,7 @@ def edit_insert():
fauthor = record.first_author() fauthor = record.first_author()
if isinstance(fauthor, list): if isinstance(fauthor, list):
fauthor = u", ".join(fauthor) fauthor = ", ".join(fauthor)
values["PublicationsFirst_author"] = fauthor values["PublicationsFirst_author"] = fauthor
values["PublicationsAuthors"] = record.authors() values["PublicationsAuthors"] = record.authors()
......
...@@ -51,7 +51,7 @@ def affiliation_institute(): ...@@ -51,7 +51,7 @@ def affiliation_institute():
# extract keys defining the affiliation # extract keys defining the affiliation
# u and v are the main keys use in inspirehep and cds # u and v are the main keys use in inspirehep and cds
# b is uses by some note in Atlas # b is uses by some note in Atlas
keys = (record[u"110"][k] for k in ("u", "t", "b") if k in record[u"110"]) keys = (record["110"][k] for k in ("u", "t", "b") if k in record["110"])
keys = (dict(key_u=key, key_v="") for key in keys) keys = (dict(key_u=key, key_v="") for key in keys)
# check that the rules does not exist # check that the rules does not exist
...@@ -99,8 +99,8 @@ def affiliation_publication(): ...@@ -99,8 +99,8 @@ def affiliation_publication():
reg = re.compile(pattern, re.IGNORECASE) reg = re.compile(pattern, re.IGNORECASE)
key = None key = None
if u"700" in record and isinstance(record[u"700"], list): if "700" in record and isinstance(record["700"], list):
for di in record[u"700"]: for di in record["700"]:
author = di["a"] author = di["a"]
if reg.match(author): if reg.match(author):
......
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