Make up for cloudant returning 202 in a cluster setting
Signed-off-by: Dominik Jall <djall@de.ibm.com>
diff --git a/tools/cli/wskadmin b/tools/cli/wskadmin
index 9a28946..b2cbf09 100755
--- a/tools/cli/wskadmin
+++ b/tools/cli/wskadmin
@@ -128,7 +128,7 @@
}
res = request('POST', url, body, headers, auth='%s:%s' % (username, password), verbose=args.verbose)
- if res.status == 201:
+ if res.status in [201, 202]:
print '%s:%s' % (doc['uuid'], doc['key'])
else:
print 'Failed to create subject (%s)' % res.read().strip()
@@ -198,7 +198,7 @@
}
res = request('DELETE', url, headers=headers, auth='%s:%s' % (username, password), verbose=args.verbose)
- if res.status == 200:
+ if res.status in [200, 202]:
print 'Subject deleted'
else:
print 'Failed to delete subject (%s)' % res.read().strip()