git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
77b4ce1
)
print traceback to the log and don't raise the right type of exception
author
Barış Metin
<Talip-Baris.Metin@sophia.inria.fr>
Fri, 3 Jul 2009 13:13:36 +0000
(13:13 +0000)
committer
Barış Metin
<Talip-Baris.Metin@sophia.inria.fr>
Fri, 3 Jul 2009 13:13:36 +0000
(13:13 +0000)
geni/util/nodes.py
patch
|
blob
|
history
diff --git
a/geni/util/nodes.py
b/geni/util/nodes.py
index
a9c81a1
..
6f4a9b1
100644
(file)
--- a/
geni/util/nodes.py
+++ b/
geni/util/nodes.py
@@
-5,6
+5,7
@@
import os
import time
import datetime
import sys
import time
import datetime
import sys
+import traceback
from geni.util.misc import *
from geni.util.rspec import *
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:
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
# 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}
# create the rspec dict
resources = {'networks': networks, 'start_time': start_time, 'duration': duration}
resourceDict = {'Rspec': resources}