summaryrefslogtreecommitdiff
path: root/python/skytools/parsing.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/skytools/parsing.py')
-rw-r--r--python/skytools/parsing.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/skytools/parsing.py b/python/skytools/parsing.py
index 318b1bf9..3d16a3a1 100644
--- a/python/skytools/parsing.py
+++ b/python/skytools/parsing.py
@@ -25,6 +25,8 @@ def parse_pgarray(array):
>>> parse_pgarray("[0,3]={1,2,3}")
['1', '2', '3']
"""
+ if array is None:
+ return None
if not array or array[0] not in ("{", "[") or array[-1] != '}':
raise Exception("bad array format: must be surrounded with {}")
res = []