@@ -90,7 +90,7 @@ class OPCUAConnection(CommClient):
...
@@ -90,7 +90,7 @@ class OPCUAConnection(CommClient):
try:
try:
self.client.disconnect()
self.client.disconnect()
exceptExceptionase:
exceptExceptionase:
self.streams.error_stream("Disconnect from OPC-UA server %s failed: %s",self._servername(),e)
self.streams.error_stream("Disconnect from OPC-UA server {} failed: {}".format(self._servername(),e))
defping(self):
defping(self):
"""
"""
...
@@ -99,7 +99,7 @@ class OPCUAConnection(CommClient):
...
@@ -99,7 +99,7 @@ class OPCUAConnection(CommClient):
try:
try:
self.client.send_hello()
self.client.send_hello()
exceptExceptionase:
exceptExceptionase:
raiseException("Lost connection to server %s: %s",self._servername(),e)
raiseException("Lost connection to server {}.".format(self._servername()))frome
def_setup_annotation(self,annotation):
def_setup_annotation(self,annotation):
"""
"""
...
@@ -115,13 +115,12 @@ class OPCUAConnection(CommClient):
...
@@ -115,13 +115,12 @@ class OPCUAConnection(CommClient):
elifisinstance(annotation,list):
elifisinstance(annotation,list):
path=annotation
path=annotation
else:
else:
raiseException("OPC-ua mapping requires either a list of the path or dict with the path. Was given %s type containing: %s",type(annotation),annotation)
raiseException("OPC-ua mapping requires either a list of the path or dict with the path. Was given {} type containing: {}".format(type(annotation),annotation))
try:
try:
node=self.obj.get_child(path)
node=self.obj.get_child(path)
exceptExceptionase:
exceptExceptionase:
self.streams.error_stream("Could not get node: %s on server %s: %s",path,self._servername(),e)
raiseException("Could not get node: {} on server {}".format(path,self._servername()))frome
raiseException("Could not get node: %s on server %s",path,self._servername())frome