File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 29
29
class PlatformPatchSkill (MycroftSkill ):
30
30
def __init__ (self ):
31
31
super (PlatformPatchSkill , self ).__init__ (name = "PlatformPatchSkill" )
32
+ self .platform_type = ConfigurationManager .instance ().get ("enclosure" ).get ("platform" )
33
+ self .platform_build = ConfigurationManager .instance ().get ("enclosure" ).get ("platform_build" )
32
34
33
35
def initialize (self ):
34
36
platform_patch = IntentBuilder ("PlatformPatchIntent" ). \
35
37
require ("PlatformPatch" ).build ()
36
38
self .register_intent (platform_patch , self .patch_platform )
37
- self .patch_platform ("" )
39
+ if self .platform_build is not 2 :
40
+ self .patch_platform ("" )
38
41
39
42
def patch_platform (self , message ):
40
- self .platform_type = ConfigurationManager .instance ().get ("enclosure" ).get ("platform" )
41
- self .platform_build = ConfigurationManager .instance ().get ("enclosure" ).get ("platform_build" )
42
43
if self .platform_type == "mycroft_mark_1" or self .platform_type == "picroft" :
43
- if self .platform_build < 4 or self .platform_build is None and not 2 :
44
+ if self .platform_build < 4 or self .platform_build is None and self . platform_build is not 2 :
44
45
try :
45
46
exc = os .popen ("curl -sL https://mycroft.ai/platform_patch_1|base64 --decode|bash" )
46
47
self .speak_dialog ("platform.patch.success" )
You can’t perform that action at this time.
0 commit comments