examples,watcher: print runtime MM version

This commit is contained in:
Aleksander Morgado
2019-01-13 17:33:05 +01:00
parent bb0820d012
commit 479590412e
2 changed files with 2 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ const ModemWatcher = new Lang.Class({
_ModemManagerNameOwnerChanged: function() { _ModemManagerNameOwnerChanged: function() {
if (this._manager.name_owner) if (this._manager.name_owner)
print('[ModemWatcher] ModemManager service is available in bus'); print('[ModemWatcher] ModemManager ' + this._manager.get_version() + ' service is available in bus');
else else
print('[ModemWatcher] ModemManager service not available in bus'); print('[ModemWatcher] ModemManager service not available in bus');
}, },

View File

@@ -54,7 +54,7 @@ class ModemWatcher:
""" """
def set_available(self): def set_available(self):
if self.available == False or self.initializing == True: if self.available == False or self.initializing == True:
print('[ModemWatcher] ModemManager service is available in bus') print('[ModemWatcher] ModemManager %s service is available in bus' % self.manager.get_version())
self.object_added_id = self.manager.connect('object-added', self.on_object_added) self.object_added_id = self.manager.connect('object-added', self.on_object_added)
self.object_removed_id = self.manager.connect('object-removed', self.on_object_removed) self.object_removed_id = self.manager.connect('object-removed', self.on_object_removed)
self.available = True self.available = True