diff --git a/mycroft/api/__init__.py b/mycroft/api/__init__.py index ee9afdde34..517fba8e34 100644 --- a/mycroft/api/__init__.py +++ b/mycroft/api/__init__.py @@ -225,10 +225,10 @@ def has_been_paired(): Returns: bool: True if ever paired with backend (not factory reset) """ - id = IdentityManager.get() - return id.uuid is not None and id.uuid != "" - - + id = IdentityManager.get() + return id.uuid is not None and id.uuid != "" + + def is_paired(): """ Determine if this device is actively paired with a web backend diff --git a/mycroft/client/enclosure/__init__.py b/mycroft/client/enclosure/__init__.py index 5fb030c69f..57a3897744 100644 --- a/mycroft/client/enclosure/__init__.py +++ b/mycroft/client/enclosure/__init__.py @@ -357,22 +357,26 @@ class Enclosure(object): if has_been_paired(): # TODO: Enclosure/localization self.ws.emit(Message("speak", { - 'utterance': "This unit is not connected to the Internet. Either " - "plug in a network cable or hold the button on top for " - "two seconds, then select wifi from the menu"})) + 'utterance': "This unit is not connected to the Internet." + " Either plug in a network cable or hold the " + "button on top for two seconds, then select " + "wifi from the menu" + })) else: # Begin the unit startup process, this is the first time it # is being run with factory defaults. - + # TODO: This logic should be in Enclosure_Mark1 # TODO: Enclosure/localization - + # Don't listen to mic during this out-of-box experience self.ws.emit(Message("mycroft.mic.mute", None)) - + # Kick off wifi-setup automatically - self.ws.emit(Message("mycroft.wifi.start", {'msg': "Hello I am " - "Mycroft, your new assistant. To assist you I need to be " - "connected to the internet. You can either plug me in " - "with a network cable, or use wifi. To setup wifi ", - 'allow_timeout': False})) + self.ws.emit(Message("mycroft.wifi.start", + {'msg': "Hello I am Mycroft, your new " + "assistant. To assist you I need to be " + "connected to the internet. You can " + "either plug me in with a network cable," + " or use wifi. To setup wifi ", + 'allow_timeout': False})) diff --git a/mycroft/client/wifisetup/main.py b/mycroft/client/wifisetup/main.py index 254e901fa5..2533fffd7e 100644 --- a/mycroft/client/wifisetup/main.py +++ b/mycroft/client/wifisetup/main.py @@ -294,17 +294,17 @@ class WiFi: ''' if self.starting: return - + self.starting = True LOG.info("Starting access point...") - + self.intro_msg = "" if event and event.data.get("msg"): self.intro_msg = event.data.get("msg") self.allow_timeout = True if event and event.data.get("allow_timeout"): self.allow_timeout = event.data.get("allow_timeout") - + # Fire up our access point self.ap.up() if not self.server: @@ -543,7 +543,7 @@ class WiFi: self.server.server.server_close() self.server.join() self.server = None - LOG.info("Access point stopped!") + LOG.info("Access point stopped!") def run(self): try: diff --git a/mycroft/util/__init__.py b/mycroft/util/__init__.py index 8b49bf03e4..c8f35363d4 100644 --- a/mycroft/util/__init__.py +++ b/mycroft/util/__init__.py @@ -384,6 +384,6 @@ def stop_speaking(): kill([config.get('tts').get('module')]) kill(["aplay"]) time.sleep(0.25) - + # This consumes the signal check_for_signal('stoppingTTS')