Skip to content
Snippets Groups Projects
Commit 2eda43f4 authored by František Řezníček's avatar František Řezníček
Browse files

fix: Handle situation when source server has no security-groups linked

This patch fixes following problem:
2024-07-02 12:29:49,117 project-migrator INFO F.9 Destination OpenStack server keypair exists (vscht)
Traceback (most recent call last):
  File "/home/freznicek/prjs/muni/sources/gitlab.ics.muni.cz/g1-g2-ostack-cloud-migration.git/ci/./project-migrator.py", line 389, in <module>
    sys.exit(main(ARGS))
             ^^^^^^^^^^
  File "/home/freznicek/prjs/muni/sources/gitlab.ics.muni.cz/g1-g2-ostack-cloud-migration.git/ci/./project-migrator.py", line 190, in main
    olib.get_or_create_dst_server_security_groups(args,
  File "/home/freznicek/prjs/muni/sources/gitlab.ics.muni.cz/g1-g2-ostack-cloud-migration.git/ci/olib.py", line 452, in get_or_create_dst_server_security_groups
    for i_src_server_security_group_name in {i_sg['name'] for i_sg in src_server.security_groups}:
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
[freznicek@lenovo-t14 ci 1]$
parent a3db8fba
No related branches found
No related tags found
No related merge requests found
Pipeline #469707 passed with stage
in 22 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment