summaryrefslogtreecommitdiffstats
path: root/src/python
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2013-10-31 14:36:47 +0100
committerMichal Minar <miminar@redhat.com>2013-10-31 14:50:36 +0100
commiteffab1c1a3b4526680b8a8fac5cd5dbbd3d35ca6 (patch)
tree152cb5a2f184fb7bffd2d0af11d3db95ff64970c /src/python
parentce4e62c97cfcf9d7a895d5614df4cd9af98a08c5 (diff)
downloadopenlmi-providers-effab1c1a3b4526680b8a8fac5cd5dbbd3d35ca6.tar.gz
openlmi-providers-effab1c1a3b4526680b8a8fac5cd5dbbd3d35ca6.tar.xz
openlmi-providers-effab1c1a3b4526680b8a8fac5cd5dbbd3d35ca6.zip
python: fixed is_this_system
Let's use gethostname() instead of querying BaseConfiguration's system_name property that has been removed.
Diffstat (limited to 'src/python')
-rw-r--r--src/python/lmi/providers/__init__.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/python/lmi/providers/__init__.py b/src/python/lmi/providers/__init__.py
index 7aec342..9ee8376 100644
--- a/src/python/lmi/providers/__init__.py
+++ b/src/python/lmi/providers/__init__.py
@@ -23,7 +23,6 @@ Common utilities for OpenLMI python providers.
"""
import socket
-from lmi.base.BaseConfiguration import BaseConfiguration
def parse_instance_id(instance_id, classname=None):
"""
@@ -55,5 +54,4 @@ def is_this_system(system_name):
:rtype: boolean
"""
return ( socket.gethostbyaddr(system_name)[0]
- == socket.gethostbyaddr(
- BaseConfiguration.INSTANCE.system_class_name)[0])
+ == socket.gethostbyaddr(socket.gethostname())[0])