summaryrefslogtreecommitdiff
path: root/openstackclient/api/api.py
diff options
context:
space:
mode:
authorColleen Murphy <colleen@gazlene.net>2017-01-25 18:07:17 +0100
committerColleen Murphy <colleen@gazlene.net>2017-01-25 18:07:17 +0100
commit365d839a5b4e685d9a12f81386ddfaab07c56d83 (patch)
treeaa914a4b5db70d62e0e2480bd234599ec78433ec /openstackclient/api/api.py
parentb69b539a422860bfb402093ff9d93a1b6e338b26 (diff)
downloadpython-openstackclient-365d839a5b4e685d9a12f81386ddfaab07c56d83.tar.gz
Fix 'mapping set' return value
Without this patch, the command 'openstack mapping set <args>' will, upon success, print the rules for the updated mapping and exit with return code 1 (failure). This is a problem for scripts and config management tools that depend on the return code to validate whether the operation was successful, since even upon success the command returns a failing error code. Moreover, the behavior of printing the new value is completely unlike the behavior of any of the 'set' subcommands for other entities. This patch normalizes the 'mapping set' command by omitting any return value in the SetMapping take_action() method. This way the client will only exit with an error code if an exception is raised, and not upon normal operation. Change-Id: I610ec3b2fa7561072346d46e49cfc1ae82130e0d
Diffstat (limited to 'openstackclient/api/api.py')
0 files changed, 0 insertions, 0 deletions