Check if the provided domain exists within the zone
(domain, zones)
| 90 | |
| 91 | |
| 92 | def check_zones(domain, zones): |
| 93 | """ |
| 94 | Check if the provided domain exists within the zone |
| 95 | """ |
| 96 | for zone in zones: |
| 97 | if domain == zone or domain.startswith(zone + "."): |
| 98 | return zone |
| 99 | return None |
| 100 | |
| 101 | |
| 102 | def swap_order(value): |