Skip to content
This repository has been archived by the owner on Jan 13, 2020. It is now read-only.
/ apyfal Public archive

Commit

Permalink
Fix error message showing "accelerator" with regions.
Browse files Browse the repository at this point in the history
  • Loading branch information
JGoutin committed Jun 19, 2018
1 parent 93de369 commit 760da20
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apyfal/host/_csp.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,10 +457,12 @@ def _set_accelerator_requirements(self, accel_client=None, accel_parameters=None
parameters.update(accel_parameters)

# Check if region is valid
print(parameters)
if self._region not in parameters.keys():
raise _exc.HostConfigurationException(
"Region '%s' is not supported. Available regions are: %s" % (
self._region, ', '.join(parameters)))
self._region, ', '.join(
region for region in parameters if region != 'accelerator')))

# Get accelerator name
self._accelerator = parameters['accelerator']
Expand Down

0 comments on commit 760da20

Please sign in to comment.