@@ -25,10 +26,17 @@
else:
sub_uri = os.environ['ROS_MASTER_URI']
adv_uri = foreign_master_uri
+ print ("sub "+sub_uri)
+ print ("adv "+adv_uri)
server_sub = xmlrpclib.ServerProxy(sub_uri)
server_adv = xmlrpclib.ServerProxy(adv_uri)
while 1:
- code, msg, topics = server_sub.getPublishedTopics('', '')
+ try:
+ code, msg, topics = server_sub.getPublishedTopics('', '')
+ except socket.error, (value,message):
+ print message
+ time.sleep(update_period)
+ continue
# Determine the type of the topic
type = None
for t in topics:
No magic, 'just doing some exception handling