diff options
author | martinko | 2013-06-20 19:49:32 +0000 |
---|---|---|
committer | martinko | 2013-06-20 19:49:32 +0000 |
commit | a1242c473d04ed2dc69d82fb371f64808dfced79 (patch) | |
tree | ebd0c314b168efbaac9e5564e650908b7703a1c8 /python/skytools/parsing.py | |
parent | f8cc1e8c0834fc4ddee1e6a5694fe522f97224ce (diff) | |
parent | 53151b6eb4413e2af98ce3bf1e73008ad2ff3710 (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.py | 2 |
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 = [] |