From 275249481ff8c56a249b09f8c589fe24671ac6ac Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Wed, 23 Dec 2020 10:43:13 +0100 Subject: [PATCH] bundles/octoprint: display version in update check, remove error states (we're monitoring this separately) --- .../octoprint/files/check_octoprint_update | 22 +++++-------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/bundles/octoprint/files/check_octoprint_update b/bundles/octoprint/files/check_octoprint_update index c65604e..60f9274 100644 --- a/bundles/octoprint/files/check_octoprint_update +++ b/bundles/octoprint/files/check_octoprint_update @@ -12,30 +12,18 @@ except Exception as e: exit(3) updates = set() -errors = set() for identifier, info in json['information'].items(): if info['updateAvailable']: - updates.add(info['displayName']) - -if not json['environment']['supported']: - errors.add('OctoPrint runs in an unsupported environment!') - -if not json['storage']['sufficient']: - errors.add('OctoPrint reports insufficient storage!') - - -for error in sorted(errors): - print(error) + updates.add('{} ({} → {})'.format( + info['displayName'] + info['information']['local']['value'], + info['information']['remote']['value'], + )) if len(updates) > 0: print('Updates available: {}'.format(', '.join(sorted(updates)))) - - -if len(errors) > 0: exit(2) -elif len(updates) > 0: - exit(1) else: print('OK') exit(0)