From: Barış Metin Date: Tue, 7 Jul 2009 09:33:39 +0000 (+0000) Subject: print the exception to give a clue about the source of the error. X-Git-Tag: sfa-0.9-0@14641~132 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;ds=sidebyside;h=e91dc4ba3b7ae84a2af7aec611084998e4517b11;p=sfa.git print the exception to give a clue about the source of the error. --- diff --git a/sfa/plc/sfa-import-plc.py b/sfa/plc/sfa-import-plc.py index 34601b03..8f4c959a 100755 --- a/sfa/plc/sfa-import-plc.py +++ b/sfa/plc/sfa-import-plc.py @@ -257,24 +257,24 @@ def import_site(parent_hrn, site): if persons: try: import_person(hrn, persons[0]) - except: - report.trace("Failed to import: %s" % persons[0]) + except Exception, e: + report.trace("Failed to import: %s (%s)" % (persons[0], e)) if 'slice_ids' in site: for slice_id in site['slice_ids']: slices = shell.GetSlices(pl_auth, [slice_id]) if slices: try: import_slice(hrn, slices[0]) - except: - report.trace("Failed to import: %s" % slices[0]) + except Exception, e: + report.trace("Failed to import: %s (%s)" % (slices[0], e)) if 'node_ids' in site: for node_id in site['node_ids']: nodes = shell.GetNodes(pl_auth, [node_id]) if nodes: try: import_node(hrn, nodes[0]) - except: - report.trace("Failed to import: %s" % nodes[0]) + except Exception, e: + report.trace("Failed to import: %s (%s)" % (nodes[0], e)) def create_top_level_auth_records(hrn): parent_hrn = get_authority(hrn)