From e91dc4ba3b7ae84a2af7aec611084998e4517b11 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Tue, 7 Jul 2009 09:33:39 +0000 Subject: [PATCH] print the exception to give a clue about the source of the error. --- sfa/plc/sfa-import-plc.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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) -- 2.43.0