Repository :
http://git.fedorahosted.org/cgit/cura-tools.git
On branch : master
---------------------------------------------------------------
commit 6b4d4dba0b400018abd45744dd66694354afdc91
Author: Michal Minar <miminar(a)redhat.com>
Date: Mon Dec 8 15:18:00 2014 +0100
lmi: fixed connection setup
LMIConnection no longer has a connection argument. This caused commands
modifying connection timeout to fail.
---------------------------------------------------------------
cli/lmi/scripts/common/command/session.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/cli/lmi/scripts/common/command/session.py
b/cli/lmi/scripts/common/command/session.py
index cbbf9fa..7714bc2 100644
--- a/cli/lmi/scripts/common/command/session.py
+++ b/cli/lmi/scripts/common/command/session.py
@@ -193,9 +193,10 @@ class LmiSessionCommand(LmiEndPointCommand):
namespace = self.cim_namespace()
timeout = self.connection_timeout()
if timeout is not None:
- if hasattr(connection.connection, "timeout"):
+ conn = getattr(connection, "connection", connection)
+ if hasattr(conn, "timeout"):
LOG().debug("Set connection timeout to %d seconds.", timeout)
- connection.timeout = timeout * 1000
+ conn.timeout = timeout * 1000
else:
LOG().debug("Could not set connection timeout.")
if namespace is not None: