Updated configure_pg_sources

This commit is contained in:
Junaid Ali 2016-05-22 11:19:46 -04:00
parent 9b7ed6df3f
commit 4999e4d5f3
2 changed files with 2 additions and 4 deletions

View File

@ -94,8 +94,7 @@ def config_changed():
stop_pg()
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(update=True)
pkgs = determine_packages()
for pkg in pkgs:

View File

@ -91,9 +91,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():