pyhton and c related fixes on empty filters and mangling

This commit is contained in:
Domingo Dirutigliano
2025-03-24 11:55:51 +01:00
parent b654967247
commit 8ddd8b44f2
7 changed files with 43 additions and 31 deletions

View File

@@ -25,7 +25,9 @@ def pyfilter(func):
def get_pyfilters():
"""Returns the list of functions marked with @pyfilter."""
return list(pyfilter.registry)
if hasattr(pyfilter, "registry"):
return list(pyfilter.registry)
return []
def clear_pyfilter_registry():
"""Clears the pyfilter registry."""