Skip to content

Commit 73715f3

Browse files
author
Amir Biglarbegian
committed
MB-55677 Fix the bug when parameter is None
Len function fails if passed a None value. Also the right test in _post_form_encoded function is to check if the params is a string. Here we're fixing this issue. Change-Id: I603e4a82a53fe7cd2a71c81e478d82eefed7ec72 Reviewed-on: https://review.couchbase.org/c/couchbase-cli/+/187452 Well-Formed: Restriction Checker Tested-by: Build Bot <build@couchbase.com> Reviewed-by: James Lee <james.lee@couchbase.com>
1 parent c1db44c commit 73715f3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cluster_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2399,7 +2399,7 @@ def _get(self, url, params=None):
23992399
@request
24002400
def _post_form_encoded(self, url, params):
24012401
if self.debug:
2402-
if len(params) and not isinstance(params[0], tuple):
2402+
if params is not None and isinstance(params, str):
24032403
print(f'POST {url} {params}')
24042404
else:
24052405
print(f'POST {url} {self._url_encode_params(params)}')

0 commit comments

Comments
 (0)