Total Complexity | 3 |
Total Lines | 17 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | """This module provides a command to open the Rainmeter Skin folder.""" |
||
12 | class RainmeterOpenSkinsFolderCommand(sublime_plugin.WindowCommand): #pylint: disable=R0903; sublime text API, methods are overriden |
||
13 | """ |
||
14 | WindowCommands are instantiated once per window. |
||
15 | |||
16 | The Window object may be retrieved via self.window. |
||
17 | """ |
||
18 | |||
19 | def run(self): |
||
20 | """Called when the command is run.""" |
||
21 | skinspath = get_cached_skin_path() |
||
22 | if not skinspath or not os.path.exists(skinspath): |
||
23 | sublime.error_message( |
||
24 | "Error while trying to open Rainmeter" + |
||
25 | " skins folder: Directory not found. Please check the" + |
||
26 | " value of your \"skins_path\" setting.") |
||
27 | return |
||
28 | self.window.run_command("open_dir", {"dir": skinspath}) |
||
29 |