Updated configure_pg_sources
This commit is contained in:
parent
d583e39a08
commit
2bd6e0690f
|
@ -67,8 +67,7 @@ def config_changed():
|
|||
charm_config.changed('install_keys')):
|
||||
status_set('maintenance', 'Upgrading apt packages')
|
||||
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()
|
||||
apt_update()
|
||||
pkgs = determine_packages()
|
||||
|
|
|
@ -75,9 +75,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…
Reference in New Issue