This will add a string to the GROUPS array if it does not exist. It will then return the index of the string within the Array
(str_to_add, groups)
| 40 | |
| 41 | |
| 42 | def add_to_list(str_to_add, groups): |
| 43 | """ |
| 44 | This will add a string to the GROUPS array if it does not exist. |
| 45 | It will then return the index of the string within the Array |
| 46 | """ |
| 47 | if str_to_add.replace(".", REPLACE_CHAR) not in groups: |
| 48 | groups.append(str_to_add.replace(".", REPLACE_CHAR)) |
| 49 | return groups.index(str_to_add.replace(".", REPLACE_CHAR)) |
| 50 | |
| 51 | |
| 52 | def is_aws_domain(domain): |
no outgoing calls
no test coverage detected