From 6be4ee2ff3cdd0a1bfc20634d8c3b592565cf1d7 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 28 Sep 2018 13:53:08 +0200 Subject: [PATCH] configtypes: Be more explicit about None-values --- qutebrowser/config/configtypes.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qutebrowser/config/configtypes.py b/qutebrowser/config/configtypes.py index f2bd12a74..f4857fc36 100644 --- a/qutebrowser/config/configtypes.py +++ b/qutebrowser/config/configtypes.py @@ -1381,7 +1381,7 @@ class ShellCommand(List): if value is configutils.UNSET: return value elif not value: - return value + return [] if (self.placeholder and '{}' not in ' '.join(value) and @@ -1647,8 +1647,10 @@ class ConfirmQuit(FlagList): def to_py(self, value): values = super().to_py(value) - if not values or values is configutils.UNSET: + if values is configutils.UNSET: return values + elif not values: + return [] # Never can't be set with other options if 'never' in values and len(values) > 1: