From 9248643e6f220e885dc6de1ec500931d50efce7e Mon Sep 17 00:00:00 2001 From: ashfinal Date: Wed, 11 May 2022 00:01:14 +0800 Subject: [PATCH] Fix bad def naming --- nvr/nvr.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/nvr/nvr.py b/nvr/nvr.py index b06cde7..8a6dfd4 100644 --- a/nvr/nvr.py +++ b/nvr/nvr.py @@ -56,14 +56,14 @@ class Nvr(): pass def try_attach(self, args, nvr, options, arguments): - for i in range(10): - self.attach() - if self.server: - self.started_new_process = True - return main2(nvr, options, arguments) - time.sleep(0.2) - print(f'[!] Unable to attach to the new nvim process. Is `{" ".join(args)}` working?') - sys.exit(1) + for i in range(10): + self.attach() + if self.server: + self.started_new_process = True + return proceed_after_attach(nvr, options, arguments) + time.sleep(0.2) + print(f'[!] Unable to attach to the new nvim process. Is `{" ".join(args)}` working?') + sys.exit(1) def execute_new_nvim_process(self, silent, nvr, options, arguments): if not silent: @@ -436,10 +436,10 @@ def main(argv=sys.argv, env=os.environ): sys.exit(1) nvr.execute_new_nvim_process(silent, nvr, options, arguments) - main2(nvr, options, arguments) + proceed_after_attach(nvr, options, arguments) -def main2(nvr, options, arguments): +def proceed_after_attach(nvr, options, arguments): if options.d: nvr.diffmode = True