From effab1c1a3b4526680b8a8fac5cd5dbbd3d35ca6 Mon Sep 17 00:00:00 2001 From: Michal Minar Date: Thu, 31 Oct 2013 14:36:47 +0100 Subject: python: fixed is_this_system Let's use gethostname() instead of querying BaseConfiguration's system_name property that has been removed. --- src/python/lmi/providers/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/python') 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]) -- cgit