diff --git a/opcua/tools.py b/opcua/tools.py index 889cd5fe..cc93269e 100644 --- a/opcua/tools.py +++ b/opcua/tools.py @@ -418,8 +418,9 @@ def application_to_strings(app): for (n, v) in optionals: if v: result.append((n, v)) - for url in app.DiscoveryUrls: - result.append(('Discovery URL', url)) + if app.DiscoveryUrls: + for url in app.DiscoveryUrls: + result.append(('Discovery URL', url)) return result # ['{}: {}'.format(n, v) for (n, v) in result]