From 9e3764fb582818af5ac1198784bfd0771d15ae3e Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Thu, 19 Nov 2015 19:42:59 -0800 Subject: [PATCH] Add some more lifecycle information to the listing --- uvcclient/uvcclient.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/uvcclient/uvcclient.py b/uvcclient/uvcclient.py index b4ecb52..a7526bc 100755 --- a/uvcclient/uvcclient.py +++ b/uvcclient/uvcclient.py @@ -147,6 +147,7 @@ def index(self): return [{'name': x['name'], 'uuid': x['uuid'], 'state': x['state'], + 'managed': x['managed'], } for x in cams] def name_to_uuid(self, name): @@ -247,7 +248,13 @@ def main(): client.dump(opts.uuid) elif opts.list: for cam in client.index(): - if cam['state'] == 'DISCONNECTED': + if not cam['managed']: + status = 'new' + elif cam['state'] == 'FIRMWARE_OUTDATED': + status = 'outdated' + elif cam['state'] == 'UPGRADING': + status = 'upgrading' + elif cam['state'] == 'DISCONNECTED': status = 'offline' elif cam['state'] == 'CONNECTED': status = 'online'