Skip to content

Commit

Permalink
Make path provider more robust showing the user is missing Rainmeter
Browse files Browse the repository at this point in the history
  • Loading branch information
thatsIch committed Nov 30, 2016
1 parent d506cbf commit 57f626d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions path/program_path_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def get_cached_program_path():
asubkey_name = winreg.EnumKey(keyval, i)
asubkey = winreg.OpenKey(keyval, asubkey_name)
val = winreg.QueryValueEx(asubkey, "DisplayName")
logger.info(__file__, "get_cached_program_path()", val)
logger.info(__file__, "get_cached_program_path()", "found rainmeter path through registry: " + val)
except EnvironmentError:
break

Expand All @@ -40,8 +40,9 @@ def get_cached_program_path():

# Check if path exists and contains Rainmeter.exe
if not os.path.exists(rainmeterpath + "Rainmeter.exe"):
logger.info(__file__, "get_cached_program_path()",
"Path to Rainmeter.exe could not be found. Check your \"rainmeter_path\" setting.")
message = "Path to Rainmeter.exe could neither be found in the standard directory nor via registry. Check your \"rainmeter_path\" setting."
logger.info(__file__, "get_cached_program_path()", message)
sublime.error_message(message)
return

logger.info(__file__, "get_cached_program_path()", "Rainmeter found in " + rainmeterpath)
Expand Down

0 comments on commit 57f626d

Please sign in to comment.