diff options
Diffstat (limited to 'blessings')
-rw-r--r-- | blessings/__init__.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/blessings/__init__.py b/blessings/__init__.py index 276565b..5efcb0b 100644 --- a/blessings/__init__.py +++ b/blessings/__init__.py @@ -453,10 +453,12 @@ class NullCallableString(unicode): new = unicode.__new__(cls, u'') return new - def __call__(self, arg): - if isinstance(arg, int): + def __call__(self, *args): + if len(args) != 1: + return u'' + if isinstance(args[0], int): return u'' - return arg # TODO: Force even strs in Python 2.x to be unicodes? Nah. How would I know what encoding to use to convert it? + return args[0] # TODO: Force even strs in Python 2.x to be unicodes? Nah. How would I know what encoding to use to convert it? def split_into_formatters(compound): |