You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
255 B
Python
14 lines
255 B
Python
2 years ago
|
import dns.name
|
||
|
|
||
|
|
||
|
class FilterModule:
|
||
|
def filters(self):
|
||
|
return {
|
||
|
"remove_domain_suffix": remove_domain_suffix,
|
||
|
}
|
||
|
|
||
|
|
||
|
def remove_domain_suffix(name):
|
||
|
parent = dns.name.from_text(name).parent()
|
||
|
return parent.to_text()
|