Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
williamledoux committed Oct 17, 2013
1 parent ae9d001 commit 9b68ed6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions less2css.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
except ImportError:
from . import lesscompiler

SETTING_SHOW_ALERT = "showErrorWithWindow"

#message window
class MessageWindow:
Expand All @@ -16,10 +17,11 @@ def __init__(self, message=''):
def show(self, message):
if message == '':
return

settings = sublime.active_window().active_view().settings() \
.get("less2css", sublime.load_settings('less2css.sublime-settings'))
show_alert = settings.get("showErrorWithWindow", True)
settings = sublime.load_settings('less2css.sublime-settings')
project_settings = sublime.active_window().active_view().settings().get("less2css")
if project_settings is None:
project_settings = {}
show_alert = project_settings.get(SETTING_SHOW_ALERT, settings.get(SETTING_SHOW_ALERT,True))

if not show_alert:
return
Expand Down
2 changes: 1 addition & 1 deletion lesscompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def convertLess2Css(self, lessc_command, dirs, file='', minimised=True, outputFi
return ''

# check if an output file has been specified
if outputFile != "":
if outputFile != "" and outputFile != None:
# if the outputfile doesn't end on .css make sure that it does by appending .css
if not outputFile.endswith(".css"):
css = outputFile + ".css"
Expand Down

0 comments on commit 9b68ed6

Please sign in to comment.