[aligner] Enables the user to give formatting options (closes #116930)
authorSimon Chabot <simon.chabot@logilab.fr>
Wed, 23 Jan 2013 12:13:36 +0100
changeset 220 3365a267b308
parent 219 50a3abe0c19a
child 221 97900fe196c9
[aligner] Enables the user to give formatting options (closes #116930)
dataio.py
--- a/dataio.py	Fri Feb 15 10:13:36 2013 +0100
+++ b/dataio.py	Wed Jan 23 12:13:36 2013 +0100
@@ -42,7 +42,7 @@
                 return data.decode(encoding)
             return data
 
-def rqlquery(host, rql, indexes=None):
+def rqlquery(host, rql, indexes=None, formatopt=None):
     """ Run the rql query on the given cubicweb host
     """
 
@@ -54,7 +54,8 @@
                                 'rql=%(rql)s&vid=csvexport'
                                 % {'rql': rql, 'host': host})
     filehandle.readline()#Skip the first line
-    return parsefile(filehandle, delimiter=';', indexes=indexes);
+    return parsefile(filehandle, delimiter=';', indexes=indexes,
+                     formatopt=formatopt);
 
 def sparqlquery(endpoint, query, indexes=None):
     """ Run the sparql query on the given endpoint, and wrap the items in the