From 871215abb0c0eaf137c130895bd3a09acfacb164 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Sun, 24 Feb 2019 20:01:32 -0800 Subject: [PATCH] setup: Rush force upgrade in development mode - So that developers don't have to wait a long time to see the changes. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plinth/setup.py b/plinth/setup.py index ca88006a8..5646e59d8 100644 --- a/plinth/setup.py +++ b/plinth/setup.py @@ -425,6 +425,11 @@ class ForceUpgrader(): class PermanentFailure(Exception): """Raised when upgrade fails and there is nothing more we wish to do.""" + def __init__(self): + """Initialize the force upgrader.""" + if plinth.cfg.develop: + self.UPGRADE_ATTEMPT_WAIT_SECONDS = 10 + def on_package_cache_updated(self): """Trigger upgrades when notified about changes to package cache.