add remove_domain_suffix filter
parent
5ae7126ce2
commit
15e2db49f3
@ -0,0 +1,13 @@
|
||||
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()
|
Loading…
Reference in New Issue