From a19f0e31972c1f5f1f86a510ff845fc89fbfd8f5 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 18 Jun 2013 14:04:57 +0200 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/argparser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/argparser.py') diff --git a/src/argparser.py b/src/argparser.py index 330e08d..18a8899 100644 --- a/src/argparser.py +++ b/src/argparser.py @@ -428,7 +428,7 @@ class ArgParser(): alts[0] += ' ' * (maxfirstlen - len(alts[0])) for opt_alt in alts: if opt_alt is alts[-1]: - line += '%colour%' + opt_alt + line += '\0' + opt_alt l += len(opt_alt) if opt_type == ArgParser.ARGUMENTED: line += ' \033[04m%s\033[24m' % (opt_arg); l += len(opt_arg) + 1 elif opt_type == ArgParser.VARIADIC: line += ' [\033[04m%s\033[24m...]' % (opt_arg); l += len(opt_arg) + 6 @@ -447,7 +447,7 @@ class ArgParser(): continue first = True colour = '36' if (index & 1) == 0 else '34' - self.__print(lines[index].replace('%colour%', '\033[%s;01m' % (colour)), end=' ' * (col - lens[index])) + self.__print(lines[index].replace('\0', '\033[%s;01m' % (colour)), end=' ' * (col - lens[index])) for line in opt_help.split('\n'): if first: first = False -- cgit v1.2.3-70-g09d2