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

Update modules to fix print syntax.

parent 11bee814
...@@ -70,7 +70,7 @@ def db2df(db, query, fields=[], columns=None): ...@@ -70,7 +70,7 @@ def db2df(db, query, fields=[], columns=None):
# get the DataFrame # get the DataFrame
df = db2df(query, fields) df = db2df(query, fields)
print df.info() print(df.info())
Args: Args:
db (pyDAL.DAL): database connection. db (pyDAL.DAL): database connection.
......
...@@ -363,7 +363,7 @@ class CheckAndFix(object): ...@@ -363,7 +363,7 @@ class CheckAndFix(object):
* more than one synonym found. * more than one synonym found.
""" """
if self.dbg: if self.dbg:
print "\t\tCheck collaboration" print("\t\tCheck collaboration")
val = record.collaboration() val = record.collaboration()
if not val: if not val:
...@@ -406,7 +406,7 @@ class CheckAndFix(object): ...@@ -406,7 +406,7 @@ class CheckAndFix(object):
""" """
if self.dbg: if self.dbg:
print "\t\tCheck country" print("\t\tCheck country")
if not isinstance(record, RecordConf): if not isinstance(record, RecordConf):
return return
...@@ -453,7 +453,7 @@ class CheckAndFix(object): ...@@ -453,7 +453,7 @@ class CheckAndFix(object):
""" """
if self.dbg: if self.dbg:
print "\t\tCheck conference date" print("\t\tCheck conference date")
# conference information are available, i.e proceeding # conference information are available, i.e proceeding
if not isinstance(record, RecordConf): if not isinstance(record, RecordConf):
...@@ -505,7 +505,7 @@ class CheckAndFix(object): ...@@ -505,7 +505,7 @@ class CheckAndFix(object):
""" """
if self.dbg: if self.dbg:
print "\t\tCheck is bad oai used" print("\t\tCheck is bad oai used")
value = record.oai() value = record.oai()
match = REG_OAI.match(value) match = REG_OAI.match(value)
...@@ -531,7 +531,7 @@ class CheckAndFix(object): ...@@ -531,7 +531,7 @@ class CheckAndFix(object):
``True`` when the OAI is not defined in the record. ``True`` when the OAI is not defined in the record.
""" """
if self.dbg: if self.dbg:
print "\t\tCheck is oai" print("\t\tCheck is oai")
# field / subfield depends on the store # field / subfield depends on the store
test = ("oai" in record and "value" in record["oai"]) or \ test = ("oai" in record and "value" in record["oai"]) or \
...@@ -553,7 +553,7 @@ class CheckAndFix(object): ...@@ -553,7 +553,7 @@ class CheckAndFix(object):
""" """
if self.dbg: if self.dbg:
print "\t\tFormat authors" print("\t\tFormat authors")
record.reformat_authors(fmt) record.reformat_authors(fmt)
...@@ -576,7 +576,7 @@ class CheckAndFix(object): ...@@ -576,7 +576,7 @@ class CheckAndFix(object):
""" """
if self.dbg: if self.dbg:
print "\t\tFormat editor" print("\t\tFormat editor")
if not record.is_published(): if not record.is_published():
return return
...@@ -612,7 +612,7 @@ class CheckAndFix(object): ...@@ -612,7 +612,7 @@ class CheckAndFix(object):
""" """
if self.dbg: if self.dbg:
print "\t\tFormat university" print("\t\tFormat university")
# protection # protection
if not isinstance(record, RecordThesis): if not isinstance(record, RecordThesis):
...@@ -677,7 +677,7 @@ class CheckAndFix(object): ...@@ -677,7 +677,7 @@ class CheckAndFix(object):
""" """
if self.dbg: if self.dbg:
print "\t\tGet my authors" print("\t\tGet my authors")
# might have been computed when affiliation is checked # might have been computed when affiliation is checked
rec_id = record.id() rec_id = record.id()
...@@ -709,7 +709,7 @@ class CheckAndFix(object): ...@@ -709,7 +709,7 @@ class CheckAndFix(object):
""" """
if self.dbg: if self.dbg:
print "\t\tIs conference" print("\t\tIs conference")
if not isinstance(record, RecordConf): if not isinstance(record, RecordConf):
raise CheckException(MSG_NO_CONF) raise CheckException(MSG_NO_CONF)
...@@ -730,7 +730,7 @@ class CheckAndFix(object): ...@@ -730,7 +730,7 @@ class CheckAndFix(object):
""" """
if self.dbg: if self.dbg:
print "\t\tIs thesis" print("\t\tIs thesis")
if not isinstance(record, RecordThesis): if not isinstance(record, RecordThesis):
raise CheckException(MSG_NO_THESIS) raise CheckException(MSG_NO_THESIS)
...@@ -777,7 +777,7 @@ class CheckAndFix(object): ...@@ -777,7 +777,7 @@ class CheckAndFix(object):
""" """
if self.dbg: if self.dbg:
print "\t\tCheck my affiliation" print("\t\tCheck my affiliation")
value = record.find_affiliation(self.reg_institute) value = record.find_affiliation(self.reg_institute)
if len(value) > 0: if len(value) > 0:
...@@ -830,7 +830,7 @@ class CheckAndFix(object): ...@@ -830,7 +830,7 @@ class CheckAndFix(object):
""" """
if self.dbg: if self.dbg:
print "\t\tCheck paper reference" print("\t\tCheck paper reference")
if record.is_published(): if record.is_published():
return return
...@@ -893,7 +893,7 @@ class CheckAndFix(object): ...@@ -893,7 +893,7 @@ class CheckAndFix(object):
""" """
if self.dbg: if self.dbg:
print "\t\tCheck publisher" print("\t\tCheck publisher")
val = record.paper_editor() val = record.paper_editor()
if len(val) == 0: if len(val) == 0:
...@@ -933,7 +933,7 @@ class CheckAndFix(object): ...@@ -933,7 +933,7 @@ class CheckAndFix(object):
""" """
if self.dbg: if self.dbg:
print "\t\tCheck submitted" print("\t\tCheck submitted")
date = record.submitted() date = record.submitted()
...@@ -984,7 +984,7 @@ class CheckAndFix(object): ...@@ -984,7 +984,7 @@ class CheckAndFix(object):
""" """
if self.dbg: if self.dbg:
print "\t\tCheck temporary record" print("\t\tCheck temporary record")
# INSPIREHEP # INSPIREHEP
# Can be find by using the XML syntax: # Can be find by using the XML syntax:
......
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