Skip to content

Commit

Permalink
re-arrangement of the stuffs
Browse files Browse the repository at this point in the history
  • Loading branch information
aatchison committed Jul 3, 2017
1 parent b776a41 commit 25ceafb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,19 @@
class PlatformPatchSkill(MycroftSkill):
def __init__(self):
super(PlatformPatchSkill, self).__init__(name="PlatformPatchSkill")
self.platform_type = ConfigurationManager.instance().get("enclosure").get("platform")
self.platform_build = ConfigurationManager.instance().get("enclosure").get("platform_build")

def initialize(self):
platform_patch = IntentBuilder("PlatformPatchIntent"). \
require("PlatformPatch").build()
self.register_intent(platform_patch, self.patch_platform)
self.patch_platform("")
if self.platform_build is not 2:
self.patch_platform("")

def patch_platform(self, message):
self.platform_type = ConfigurationManager.instance().get("enclosure").get("platform")
self.platform_build = ConfigurationManager.instance().get("enclosure").get("platform_build")
if self.platform_type == "mycroft_mark_1" or self.platform_type == "picroft":
if self.platform_build < 4 or self.platform_build is None and not 2:
if self.platform_build < 4 or self.platform_build is None and self.platform_build is not 2:
try:
exc = os.popen("curl -sL https://mycroft.ai/platform_patch_1|base64 --decode|bash")
self.speak_dialog("platform.patch.success")
Expand Down

0 comments on commit 25ceafb

Please sign in to comment.