From: Sandrine Avakian Date: Tue, 15 Nov 2011 15:58:34 +0000 (+0100) Subject: 2nd attempt ... X-Git-Tag: sfa-2.1-24~3^2~289 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=8a94f09f16323035ab52db3e6c9ee85a7659d9cc;p=sfa.git 2nd attempt ... --- diff --git a/sfa/senslab/slab-import.py b/sfa/senslab/slab-import.py index 55bf2f83..832d3fcc 100644 --- a/sfa/senslab/slab-import.py +++ b/sfa/senslab/slab-import.py @@ -68,7 +68,7 @@ def import_node(hrn, node): node_record['authority'] = get_authority(node_record['hrn']) existing_records = table.find({'hrn': hrn, 'type': 'node', 'pointer': node['node_id']}) if not existing_records: - print sys.stderr, " \r\n \t slab-import : node record %s inserted" %(node_record['hrn']) + print>>sys.stderr, " \r\n \t slab-import : node record %s inserted" %(node_record['hrn']) table.insert(node_record) else: existing_record = existing_records[0] @@ -79,7 +79,7 @@ def import_node(hrn, node): def import_person(person): existing_records = table.find({'hrn': person['hrn'], 'type': 'user'}) if not existing_records: - print sys.stderr, " \r\n \t slab-import : person record %s inserted" %(person['hrn']) + print>>sys.stderr, " \r\n \t slab-import : person record %s inserted" %(person['hrn']) table.insert(person) else: existing_record = existing_records[0] @@ -92,7 +92,7 @@ def delete_record( hrn, type): # delete the record record_list = table.find({'type': type, 'hrn': hrn}) for record in record_list: - print sys.stderr, " \r\n \t slab-import : record %s deleted" %(record['hrn']) + print>>sys.stderr, " \r\n \t slab-import : record %s deleted" %(record['hrn']) table.remove(record) def hostname_to_hrn(root_auth,hostname):