From 547a417ecb963c1b48fe2ef943f37b4d411a4822 Mon Sep 17 00:00:00 2001 From: Adrian of Doom <52701496+futzu@users.noreply.github.com> Date: Mon, 25 Nov 2024 03:07:43 -0500 Subject: [PATCH] SCTE35Base.has() checks if an instance has a var and if it's set. --- threefive/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/threefive/base.py b/threefive/base.py index a26ff30c..9c5ee802 100644 --- a/threefive/base.py +++ b/threefive/base.py @@ -120,9 +120,11 @@ def b2l(val): def has(self, what): """ has runs hasattr with self and what + and checks if it's set. """ if hasattr(self, what): - return True + if vars(self)[what]: + return True return False def xml(self, ns="scte35"):