Skip to content

Commit

Permalink
fix issue #76
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianEberius committed Dec 15, 2015
1 parent a26a341 commit 247d10a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion sublime_python_colors.py
Expand Up @@ -89,9 +89,19 @@ def generate_color_scheme_async():
for c in d.getchildren():
if c.text and "sublimepythonide" in c.text:
style = style_map.get(c.text)
if style is None:
print("Warning: Unknown SublimePythonIDE color style", c.text)
continue
color_elem = d.find("./dict/string")
if color_elem is None:
print("Warning: Error parsing theme", scheme)
continue
found_color = color_elem.text.upper().lstrip("#")
target_color = colors.get(style, DEFAULT_MARK_COLORS[style]).upper().lstrip("#")
target_color = colors.get(style, DEFAULT_MARK_COLORS[style])
if target_color is None:
print("Warning: Error parsing theme", scheme, "unknown color style: ", style)
continue
target_color = target_color.upper().lstrip("#")
if found_color != target_color:
change = True
color_elem.text = "#" + target_color
Expand Down

0 comments on commit 247d10a

Please sign in to comment.