Repository :
http://git.fedorahosted.org/cgit/cura-tools.git
On branch : master
---------------------------------------------------------------
commit 280a76a7a154421078cad026d0b6a4dff395aae5
Author: Peter Hatina <phatina(a)redhat.com>
Date: Thu Jul 17 15:21:03 2014 +0200
Revert "drop unnecessary LMICompleter::_callable_postfix()"
This reverts commit 9d9b15bc8b4848797ae9f305a365a0b680752466.
---------------------------------------------------------------
cli/lmi/shell/LMICompleter.py | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/cli/lmi/shell/LMICompleter.py b/cli/lmi/shell/LMICompleter.py
index 8859c5d..b5a117b 100644
--- a/cli/lmi/shell/LMICompleter.py
+++ b/cli/lmi/shell/LMICompleter.py
@@ -40,6 +40,16 @@ class LMICompleter(rlcompleter.Completer):
def __init__(self, namespace=None):
rlcompleter.Completer.__init__(self, namespace)
+ def _callable_postfix(self, val, word):
+ """
+ :param val: object, which is checked, if it is callable
+ :param string word: input string
+ :returns: string with opening parentheses, if the value is callable
+ """
+ if hasattr(val, word) and callable(getattr(val, word)):
+ word = word + "("
+ return word
+
def complete(self, text, state):
"""
:param string text: string to be completed.