Updated configure_pg_sources
This commit is contained in:
parent
9a0cbe1512
commit
faff1653ec
@ -137,8 +137,7 @@ def config_changed():
|
||||
status_set('maintenance', 'Upgrading apt packages')
|
||||
stop_pg()
|
||||
if charm_config.changed('install_sources'):
|
||||
if not configure_pg_sources():
|
||||
log('IOError: /etc/apt/sources.list couldn\'t be updated')
|
||||
configure_pg_sources()
|
||||
configure_sources(update=True)
|
||||
pkgs = determine_packages()
|
||||
for pkg in pkgs:
|
||||
|
@ -101,9 +101,8 @@ def configure_pg_sources():
|
||||
sources.write(i)
|
||||
sources.truncate()
|
||||
sources.close()
|
||||
return True
|
||||
except IOError:
|
||||
return False
|
||||
raise IOError('Unable to access /etc/apt/sources.list')
|
||||
|
||||
|
||||
def determine_packages():
|
||||
|
Loading…
x
Reference in New Issue
Block a user