This ensures no attributes are None and simplifies some checks within the function
Otherwise, if, for instance, there were no 'data' field in a message, when deserializing, the caller would have to check for None
This sends a new system.update.check message when the device is booted and not paired
It is not sent every boot because the command could upgrade across major versions which the user could not want.
- Create a read_vocab_file() function that normal vocab loading and voc_match both uses. This function handles blank lines and comments
- Use a simpler regex instead of word logic to match
- Add a couple of test cases for the method
Several changes to the logging using in all processes:
* Disable logging of bus messages by default (massively cleans up the logs)
* Add "mycroft.debug.log" bus message. It supports the data={"bus": True/False} as well as
data={"log": LEVEL}, where level is a Python logging level.
CLI now supports several commands:
* ```:log level XXX``` where XXX is the name of a standard Python level (e.g. 'debug')
* ```:log bus on``` or ```:log bus off```
* Removed the requirement for "log" in ```:clear log```. ```:clear``` works now.
The mic-level meter that appears in the Mycroft CLI could stop updating in
rare cases when a file I/O operation failed. It would also fail to show
a meter ever if the mic_level file hadn't been created before the CLI was
started.
Previously the voc_match() method had several problems:
* Blank lines in the .voc file would cause it to match all strings
* Comments weren't ignored
* Substrings matched so "book" would match "ok", for instance
Ambiguous times previously used a generally unexpected rule about
when to jump 12 hours when parsing times. Now it follows the rule:
If a time is spoken without am/pm indicator, assume the next time
that hasn't passed was intended.
For example:
"at 7 o'clock"
Would mean 7:00am if spoken at 6:59am, but would mean 7:00pm
if spoken at 7:01am.
* Remove the old single viseme message
Instead a single viseme message is sent
* Correct the spelling of viseme.
Ref: https://en.wikipedia.org/wiki/Viseme
* Remove debug print.
This was probably left in by mistake, removing to clean up the audio log somewhat.
In the case where a network call during the initialization of the
settings poll fails the first time, it would never be tried again.
Now it will retry initialization once a minute.
The settings code worked, but was noisy and generally messy about
a few exceptional but common situations:
* When the .mycroft/skills/<SkillName> folder didn't already exist
* When network timeouts and such occcurred
I also slipped in a couple trivial code cleanups for an unused variable
and a log message.