From d3eb7bd4b0f8cf649d78273c236720c96f6b9cbf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Fri, 3 Jul 2009 13:13:36 +0000 Subject: [PATCH] print traceback to the log and don't raise the right type of exception --- geni/util/nodes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/geni/util/nodes.py b/geni/util/nodes.py index a9c81a14..6f4a9b1c 100644 --- a/geni/util/nodes.py +++ b/geni/util/nodes.py @@ -5,6 +5,7 @@ import os import time import datetime import sys +import traceback from geni.util.misc import * from geni.util.rspec import * @@ -118,9 +119,11 @@ class Nodes(SimpleStorage): rspec.parseString(agg_rspec) networks.extend([{'NetSpec': rspec.getDictsByTagName('NetSpec')}]) except: - raise # XX print out to some error log print >> log, "Error calling list nodes at aggregate %s" % aggregate + traceback.print_exc(log) + exc_type, exc_value, exc_traceback = sys.exc_info() + raise exc_type, exc_value # create the rspec dict resources = {'networks': networks, 'start_time': start_time, 'duration': duration} resourceDict = {'Rspec': resources} -- 2.43.0