From 04f40497a096547aa00144ce3beb409fabec540f Mon Sep 17 00:00:00 2001 From: David Lynch Date: Wed, 27 Jul 2016 11:17:41 -0500 Subject: [PATCH] Make sure only a string is passed to sublime.error_message This was suppressing some errors, because **kwargs get passed to all callbacks from run_command. --- git/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/git/__init__.py b/git/__init__.py index f7ca4726..5458e114 100644 --- a/git/__init__.py +++ b/git/__init__.py @@ -153,6 +153,11 @@ def find_binary(cmd): GITK = find_binary('gitk') +def output_error_message(output, *args, **kwargs): + # print('error', output, args, kwargs) + sublime.error_message(output) + + class CommandThread(threading.Thread): command_lock = threading.Lock() @@ -217,7 +222,7 @@ def run(self): else: output = e.returncode except OSError as e: - callback = sublime.error_message + callback = output_error_message if e.errno == 2: global _has_warned if not _has_warned: