Skip to content

Commit 63dff42

Browse files
committed
kano-settings-onboot: Fix logging traceback
If the boot configuration was being detected as corrupted, a logging message would be written but this would fail as the `warning()` method wasn't defined on the `logger` object. Resolve this by switching to use the defined `warn()` message.
1 parent f4b2d3b commit 63dff42

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

bin/kano-settings-onboot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def main(args):
7878

7979
# Check for corrupt config file.
8080
if check_corrupt_config():
81-
logger.warning('Found corrupt config file! Restored to default.')
81+
logger.warn('Found corrupt config file! Restored to default.')
8282
reboot(dry_run=dry_run)
8383
return RC_SUCCESS
8484

debian/changelog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ kano-settings (4.1.0-0) unstable; urgency=low
66
* Fix inconsistent Settings > Display > Resolution: Auto behaviour for
77
displays with corrupted EDID
88
* Switch to use the "dtparam" value to check for config.txt corruption
9+
* Fix corrupt config.txt logging message
910

1011
-- Team Kano <[email protected]> Thu, 27 Sep 2018 12:11:00 +0100
1112

kano_settings/boot_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ def _clean_up_exit(self):
400400

401401
if self.state > 1:
402402
self.close()
403-
raise OpenTransactionError()
403+
raise OpenTransactionError('Transaction file left open')
404404

405405
def abort(self):
406406
os.remove(self.temp_path)

0 commit comments

Comments
 (0)