[gtk-mac-bundler: 10/12] Raise an exception if bundler tries to get a node without specifying its parent.
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-mac-bundler: 10/12] Raise an exception if bundler tries to get a node without specifying its parent.
- Date: Mon, 18 Jul 2022 19:22:05 +0000 (UTC)
commit 8fb70fdaec5474518094acebaade12fd7bd1a981
Author: John Ralls <jralls ceridwen us>
Date: Mon Jul 18 12:12:02 2022 -0700
Raise an exception if bundler tries to get a node without specifying its parent.
bundler/utils.py | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/bundler/utils.py b/bundler/utils.py
index e649885..4782109 100644
--- a/bundler/utils.py
+++ b/bundler/utils.py
@@ -70,6 +70,8 @@ def node_get_elements_by_tag_name(node, name):
return []
def node_get_element_by_tag_name(node, name):
+ if not node:
+ raise Exception("Can't get an element without a parent.")
try:
(data,) = node.getElementsByTagName(name)
return data
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]