equal
deleted
inserted
replaced
95 port = str(i.port) |
95 port = str(i.port) |
96 newlocation = ip + ':' + port |
96 newlocation = ip + ':' + port |
97 confnodesroot.logger.write(_("'{a1}' is located at {a2}\n").format(a1=location, a2=newlocation)) |
97 confnodesroot.logger.write(_("'{a1}' is located at {a2}\n").format(a1=location, a2=newlocation)) |
98 location = newlocation |
98 location = newlocation |
99 r.close() |
99 r.close() |
100 except Exception, msg: |
100 except Exception: |
101 confnodesroot.logger.write_error(_("MDNS resolution failure for '%s'\n") % location) |
101 confnodesroot.logger.write_error(_("MDNS resolution failure for '%s'\n") % location) |
102 confnodesroot.logger.write_error(traceback.format_exc()) |
102 confnodesroot.logger.write_error(traceback.format_exc()) |
103 return None |
103 return None |
104 |
104 |
105 # Try to get the proxy object |
105 # Try to get the proxy object |
106 try: |
106 try: |
107 RemotePLCObjectProxy = Pyro.core.getAttrProxyForURI(schemename + "://" + location + "/PLCObject") |
107 RemotePLCObjectProxy = Pyro.core.getAttrProxyForURI(schemename + "://" + location + "/PLCObject") |
108 except Exception, msg: |
108 except Exception: |
109 confnodesroot.logger.write_error(_("Connection to '%s' failed.\n") % location) |
109 confnodesroot.logger.write_error(_("Connection to '%s' failed.\n") % location) |
110 confnodesroot.logger.write_error(traceback.format_exc()) |
110 confnodesroot.logger.write_error(traceback.format_exc()) |
111 return None |
111 return None |
112 |
112 |
113 def PyroCatcher(func, default=None): |
113 def PyroCatcher(func, default=None): |