[arm/master] fix: renaming prompt and format to avoid ambiguity

commit e2e3091c1af2741e046831fdecd73677b3c1652b Author: Damian Johnson <atagar@torproject.org> Date: Sat Sep 24 17:29:05 2011 -0700 fix: renaming prompt and format to avoid ambiguity Renaming the prompt function and format variable to avoid a naming conflict with other uses of that name in the module. Not actually an error, but could lead to headaches if it did cause a bug. Caught by pylint. --- src/starter.py | 2 +- src/util/torInterpretor.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/starter.py b/src/starter.py index b184330..625000c 100644 --- a/src/starter.py +++ b/src/starter.py @@ -538,7 +538,7 @@ if __name__ == '__main__': import gui.controller gui.controller.start_gui() elif launchPrompt: - util.torInterpretor.prompt() + util.torInterpretor.showPrompt() else: cli.controller.startTorMonitor(time.time() - initTime) diff --git a/src/util/torInterpretor.py b/src/util/torInterpretor.py index cb2dcb7..1ff3b84 100644 --- a/src/util/torInterpretor.py +++ b/src/util/torInterpretor.py @@ -960,7 +960,7 @@ class ControlInterpretor: return (inputLines, outputLines) -def prompt(): +def showPrompt(): # For Python 2.6 and earlier cycling history via the readline module with # up/down is buggy with a color prompt. For more information see: # http://bugs.python.org/issue12972 @@ -1041,17 +1041,17 @@ def _splitOnNewlines(entry): entry = list(entry) # shallow copy while entry: - msg, format = entry.pop(0) + msg, msgFormat = entry.pop(0) if "\n" in msg: msg, remainder = msg.split("\n", 1) - entry.insert(0, (remainder, format)) + entry.insert(0, (remainder, msgFormat)) - tmpLine.append((msg, format)) + tmpLine.append((msg, msgFormat)) results.append(tmpLine) tmpLine = [] else: - tmpLine.append((msg, format)) + tmpLine.append((msg, msgFormat)) if tmpLine: results.append(tmpLine) return results
participants (1)
-
atagar@torproject.org