also print out stack dump when hrn can't be figured while adding a federated node
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 13 Apr 2011 08:15:35 +0000 (10:15 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 13 Apr 2011 08:15:35 +0000 (10:15 +0200)
PLC/Namespace.py
PLC/Peers.py

index 1332ea2..745c135 100644 (file)
@@ -1,6 +1,3 @@
-### $Id: Namespace.py
-### $URL:
-
 URN_PREFIX = "urn:publicid:IDN"
 
 def get_leaf(hrn):
index 6489199..1fa515a 100644 (file)
@@ -4,6 +4,7 @@
 
 import re
 from types import StringTypes
+import traceback
 from urlparse import urlparse
 
 import PLC.Auth
@@ -174,7 +175,9 @@ class Peer(Row):
             tags = {'hrn': hrn}
             Node(self.api, node).update_tags(tags)
         except:
-            print >>log, "WARNING: could not find out hrn on hostname=%s"%node['hostname']
+            print >>log, "WARNING: (beg) could not find out hrn on hostname=%s"%node['hostname']
+            traceback.print_exc(5,log)
+            print >>log, "WARNING: (end) could not find out hrn on hostname=%s"%node['hostname']
 
     def remove_node(self, node, commit = True):
         """