Merge pull request #31824 from rallytime/bp-31819

Back-port #31819 to 2015.8
This commit is contained in:
Nicole Thomas 2016-03-13 13:59:32 -06:00
commit 5464be07b1

View file

@ -653,7 +653,10 @@ def bootstrap_container(name, dist=None, version=None):
'nspawn.bootstrap: no dist provided, defaulting to \'{0}\''
.format(dist)
)
return globals()['_bootstrap_{0}'.format(dist)](name, version=version)
try:
return globals()['_bootstrap_{0}'.format(dist)](name, version=version)
except KeyError:
raise CommandExecutionError('Unsupported distribution "{0}"'.format(dist))
def _needs_install(name):