From 1255393cadf25566ed5aeee0f03b4ea28419710f Mon Sep 17 00:00:00 2001 From: line0 Date: Sun, 26 Jul 2015 23:57:05 +0200 Subject: [PATCH] Updater: check for an active internet connection before trying to pull feeds from the web --- modules/DependencyControl/Updater.moon | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/DependencyControl/Updater.moon b/modules/DependencyControl/Updater.moon index 303700c..1894727 100644 --- a/modules/DependencyControl/Updater.moon +++ b/modules/DependencyControl/Updater.moon @@ -16,6 +16,7 @@ class UpdaterBase [4]: "No remaining feed available to %s %s '%s' from." [6]: "The %s of %s '%s' failed because no suitable package could be found %s." [5]: "Skipped %s of %s '%s': Another update initiated by %s is already running." + [7]: "Skipped %s of %s '%s': An internet connection is currently not available." [10]: "Skipped %s of %s '%s': the update task is already running." [15]: "Couldn't %s %s '%s' because its requirements could not be satisfied:" [30]: "Couldn't %s %s '%s': failed to create temporary download directory %s" @@ -178,6 +179,9 @@ class UpdateTask extends UpdaterBase return logUpdateError -4 + -- check internet connection + return logUpdateError -7 unless dlm\isInternetConnected! + -- get a lock on the updater success, otherHost = @updater\getLock waitLock return logUpdateError -5, otherHost unless success