Skip to content

Commit 6915519

Browse files
authored
Fix other OS crashing on STARTUPINFO
1 parent 973ed77 commit 6915519

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

git-blame.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@
2525
</span>
2626
'''
2727

28-
si = subprocess.STARTUPINFO()
29-
si.dwFlags |= subprocess.STARTF_USESHOWWINDOW
30-
28+
# Sometimes this fails on other OS, just error silently
29+
try:
30+
si = subprocess.STARTUPINFO()
31+
si.dwFlags |= subprocess.STARTF_USESHOWWINDOW
32+
except:
33+
si = None
3134

3235
class BlameCommand(sublime_plugin.TextCommand):
3336

@@ -77,4 +80,4 @@ def run(self, edit):
7780

7881
phantom = sublime.Phantom(line, body, sublime.LAYOUT_BLOCK, self.on_phantom_close)
7982
phantoms.append(phantom)
80-
self.phantom_set.update(phantoms)
83+
self.phantom_set.update(phantoms)

0 commit comments

Comments
 (0)