Fix traceback when using the module (#58588)
Since bricks_in_volume is a list, it can't be compared to a int. Traceback (most recent call last): File \"/root/.ansible/tmp/ansible-tmp-1561989216.06-31322871319024/AnsiballZ_gluster_volume.py\", line 114, in <module> _ansiballz_main() File \"/root/.ansible/tmp/ansible-tmp-1561989216.06-31322871319024/AnsiballZ_gluster_volume.py\", line 106, in _ansiballz_main invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS) File \"/root/.ansible/tmp/ansible-tmp-1561989216.06-31322871319024/AnsiballZ_gluster_volume.py\", line 49, in invoke_module imp.load_module('__main__', mod, module, MOD_DESC) File \"/usr/lib64/python3.7/imp.py\", line 234, in load_module return load_source(name, filename, file) File \"/usr/lib64/python3.7/imp.py\", line 169, in load_source module = _exec(spec, sys.modules[name]) File \"<frozen importlib._bootstrap>\", line 630, in _exec File \"<frozen importlib._bootstrap_external>\", line 728, in exec_module File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed File \"/tmp/ansible_gluster_volume_payload_d5mfag24/__main__.py\", line 610, in <module> File \"/tmp/ansible_gluster_volume_payload_d5mfag24/__main__.py\", line 551, in main TypeError: '<' not supported between instances of 'int' and 'list'
This commit is contained in:
parent
5f8080aaa0
commit
06651d1055
1 changed files with 1 additions and 1 deletions
|
@ -548,7 +548,7 @@ def main():
|
||||||
if brick not in bricks_in_volume:
|
if brick not in bricks_in_volume:
|
||||||
new_bricks.append(brick)
|
new_bricks.append(brick)
|
||||||
|
|
||||||
if not new_bricks and len(all_bricks) < bricks_in_volume:
|
if not new_bricks and len(all_bricks) < len(bricks_in_volume):
|
||||||
for brick in bricks_in_volume:
|
for brick in bricks_in_volume:
|
||||||
if brick not in all_bricks:
|
if brick not in all_bricks:
|
||||||
removed_bricks.append(brick)
|
removed_bricks.append(brick)
|
||||||
|
|
Loading…
Reference in a new issue