Might as well check apt proxy early

Moved CheckAptProxy to preparation phase
Changed the logging to output a warning instead of an error
Changed the error message a little
This commit is contained in:
Anders Ingemann 2014-05-23 20:19:09 +02:00
parent 4ba701cfad
commit 08c0a88459

View file

@ -6,8 +6,8 @@ import urllib2
class CheckAptProxy(Task): class CheckAptProxy(Task):
description = 'Checking APT proxy server' description = 'Checking reachability of APT proxy server'
phase = phases.package_installation phase = phases.preparation
@classmethod @classmethod
def run(cls, info): def run(cls, info):
@ -23,13 +23,13 @@ class CheckAptProxy(Task):
else: else:
import logging import logging
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
log.error('The APT proxy server couldn\'t be reached. `apt-get` commands may fail from now on.') log.warning('The APT proxy server couldn\'t be reached. `apt-get\' commands may fail.')
class SetAptProxy(Task): class SetAptProxy(Task):
description = 'Setting proxy for APT' description = 'Setting proxy for APT'
phase = phases.package_installation phase = phases.package_installation
successors = [apt.AptUpdate, CheckAptProxy] successors = [apt.AptUpdate]
@classmethod @classmethod
def run(cls, info): def run(cls, info):