diff --git a/less2css.py b/less2css.py index ad5592c..cb399f8 100644 --- a/less2css.py +++ b/less2css.py @@ -7,6 +7,7 @@ except ImportError: from . import lesscompiler +SETTING_SHOW_ALERT = "showErrorWithWindow" #message window class MessageWindow: @@ -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 diff --git a/lesscompiler.py b/lesscompiler.py index 2e1effb..9aae60e 100644 --- a/lesscompiler.py +++ b/lesscompiler.py @@ -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"