From 0e9177eb4f575d583569af82449f83537f6ef1f4 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 14 Oct 2014 07:57:42 +0200 Subject: [PATCH] Rename ipc param to process_args to via_ipc. This prevents shadowing of the module. --- qutebrowser/app.py | 10 +++++----- qutebrowser/utils/ipc.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/qutebrowser/app.py b/qutebrowser/app.py index 8b1e7a53f..52fc6c626 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -230,9 +230,9 @@ class Application(QApplication): self._open_startpage() self._open_quickstart() - def _get_window(self, ipc): + def _get_window(self, via_ipc): """Helper function for process_args to get a window id.""" - if not ipc: + if not via_ipc: return 0 open_target = config.get('general', 'ipc-open-target') if open_target in ('tab', 'tab-silent'): @@ -252,16 +252,16 @@ class Application(QApplication): else: return mainwindow.MainWindow.spawn() - def process_args(self, args, ipc=False): + def process_args(self, args, via_ipc=False): """Process commandline args. URLs to open have no prefix, commands to execute begin with a colon. Args: args: A list of arguments to process. - ipc: Whether the arguments were transmitted over IPC. + via_ipc: Whether the arguments were transmitted over IPC. """ - win_id = self._get_window(ipc) + win_id = self._get_window(via_ipc) if win_id is None: return for cmd in args: diff --git a/qutebrowser/utils/ipc.py b/qutebrowser/utils/ipc.py index 7598efb5d..5e7a8b6e4 100644 --- a/qutebrowser/utils/ipc.py +++ b/qutebrowser/utils/ipc.py @@ -145,7 +145,7 @@ class IPCServer(QObject): return log.ipc.debug("Processing: {}".format(decoded)) app = objreg.get('app') - app.process_args(args, ipc=True) + app.process_args(args, via_ipc=True) @pyqtSlot() def on_timeout(self):