summaryrefslogtreecommitdiff
path: root/python/skytools/parsing.py
diff options
context:
space:
mode:
authormartinko2013-06-20 19:49:32 +0000
committermartinko2013-06-20 19:49:32 +0000
commita1242c473d04ed2dc69d82fb371f64808dfced79 (patch)
treeebd0c314b168efbaac9e5564e650908b7703a1c8 /python/skytools/parsing.py
parentf8cc1e8c0834fc4ddee1e6a5694fe522f97224ce (diff)
parent53151b6eb4413e2af98ce3bf1e73008ad2ff3710 (diff)
Merge branch 'master' of https://github.com/markokr/skytools into develop
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 = []