Skip to content

Commit 25ceafb

Browse files
committed
re-arrangement of the stuffs
1 parent b776a41 commit 25ceafb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

__init__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,19 @@
2929
class PlatformPatchSkill(MycroftSkill):
3030
def __init__(self):
3131
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")
3234

3335
def initialize(self):
3436
platform_patch = IntentBuilder("PlatformPatchIntent"). \
3537
require("PlatformPatch").build()
3638
self.register_intent(platform_patch, self.patch_platform)
37-
self.patch_platform("")
39+
if self.platform_build is not 2:
40+
self.patch_platform("")
3841

3942
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")
4243
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:
4445
try:
4546
exc = os.popen("curl -sL https://mycroft.ai/platform_patch_1|base64 --decode|bash")
4647
self.speak_dialog("platform.patch.success")

0 commit comments

Comments
 (0)