[openlmi-tools/f19] fix indication unique name

Peter Hatina phatina at fedoraproject.org
Fri Dec 6 13:14:06 UTC 2013


commit e1c5cdd61dca786b632318563627f0b48c4fb1ae
Author: Peter Hatina <phatina at redhat.com>
Date:   Fri Dec 6 14:12:25 2013 +0100

    fix indication unique name

 openlmi-tools-10-fix-indication-unique-name.patch |   36 +++++++++++++++++++++
 openlmi-tools.spec                                |    7 +++-
 2 files changed, 42 insertions(+), 1 deletions(-)
---
diff --git a/openlmi-tools-10-fix-indication-unique-name.patch b/openlmi-tools-10-fix-indication-unique-name.patch
new file mode 100644
index 0000000..750a513
--- /dev/null
+++ b/openlmi-tools-10-fix-indication-unique-name.patch
@@ -0,0 +1,36 @@
+From 99badf76124fab972309c7b64c432a37c71cc99a Mon Sep 17 00:00:00 2001
+From: Peter Hatina <phatina at redhat.com>
+Date: Fri, 6 Dec 2013 13:30:00 +0100
+Subject: [PATCH 2/2] fix indication unique name
+
+---
+ cli/lmi/shell/LMIIndicationListener.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/cli/lmi/shell/LMIIndicationListener.py b/cli/lmi/shell/LMIIndicationListener.py
+index 4f70e77..c8647bf 100644
+--- a/cli/lmi/shell/LMIIndicationListener.py
++++ b/cli/lmi/shell/LMIIndicationListener.py
+@@ -137,7 +137,7 @@ class LMIIndicationListener(object):
+         while True:
+             while handler_name_pattern[pattern_len - 1 - x_cnt] == "X":
+                 x_cnt += 1
+-            if x_cnt < LMIIndicationListener.HANDLER_MINIMUM_REPL_CHARS_COUNT:
++            if x_cnt and x_cnt < LMIIndicationListener.HANDLER_MINIMUM_REPL_CHARS_COUNT:
+                 raise LMIHandlerNamePatternError("Not enough replaceable characters provided")
+             unique_str = handler_name_pattern[:pattern_len - x_cnt] + \
+                 "".join(random.choice(string.ascii_uppercase + string.digits) for x in range(x_cnt))
+@@ -219,7 +219,7 @@ class LMIIndicationListener(object):
+         :returns: handler unique name
+         :rtype: string
+         """
+-        handler_name = self.__create_handler_name(handler_name_pattern + "X" * 16)
++        handler_name = self.__create_handler_name(handler_name_pattern)
+         self._handlers[handler_name] = LMIIndicationHandlerCallback(handler, *args, **kwargs)
+         return handler_name
+ 
+-- 
+Peter Hatina
+ENG Server Experience, System Management
+Red Hat Czech, Brno
+
diff --git a/openlmi-tools.spec b/openlmi-tools.spec
index 35151d0..1871e96 100644
--- a/openlmi-tools.spec
+++ b/openlmi-tools.spec
@@ -1,6 +1,6 @@
 Name:           openlmi-tools
 Version:        0.9
-Release:        10%{?dist}
+Release:        11%{?dist}
 Summary:        Set of CLI tools for Openlmi providers
 
 License:        GPLv2+
@@ -15,6 +15,7 @@ Patch5:         openlmi-tools-06-fix-unify-lmishell-naming.patch
 Patch6:         openlmi-tools-07-fix-interactive-connect.patch
 Patch7:         openlmi-tools-08-fix-compulsory-call-order-listener.patch
 Patch8:         openlmi-tools-09-fix-blocking-when-receiving-indication.patch
+Patch9:         openlmi-tools-10-fix-indication-unique-name.patch
 BuildArch:      noarch
 
 BuildRequires:  automake
@@ -43,6 +44,7 @@ Obsoletes:      cura-tools < 0.1-4
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1
 
 %build
 pushd cli
@@ -86,6 +88,9 @@ install -m 644 cli/completion/_lmishell $zsh_comp_dir
 %{python_sitelib}/openlmi_tools-*
 
 %changelog
+* Fri Dec  6 2013 Peter Hatina <phatina at redhat.com> - 0.9-11
+- fix indication unique name
+
 * Fri Dec  6 2013 Peter Hatina <phatina at redhat.com> - 0.9-10
 - fix blocking timeout when receiving indication
 


More information about the scm-commits mailing list