Skip to content

Commit

Permalink
Make sure only a string is passed to sublime.error_message
Browse files Browse the repository at this point in the history
This was suppressing some errors, because **kwargs get passed to all
callbacks from run_command.
  • Loading branch information
kemayo committed Jul 27, 2016
1 parent 106010a commit 04f4049
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion git/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 04f4049

Please sign in to comment.