diff options
author | Marko Kreen | 2010-12-08 12:45:58 +0000 |
---|---|---|
committer | Marko Kreen | 2010-12-08 12:45:58 +0000 |
commit | 13ed0317a8e41ea64690d12bfe2f4e035a51e317 (patch) | |
tree | b9f992f515583d25be5977296cbfad8984df31ce | |
parent | 80c58c8ed2a551f4ccb09bae44ddc1613fcc7b55 (diff) |
skytools.unquote_ident: dont crash on empty string
-rw-r--r-- | python/skytools/quoting.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/skytools/quoting.py b/python/skytools/quoting.py index 1a144867..f4dba12c 100644 --- a/python/skytools/quoting.py +++ b/python/skytools/quoting.py @@ -142,7 +142,7 @@ def unquote_ident(val): >>> unquote_ident('"Wei "" rd"') 'Wei " rd' """ - if val[0] == '"' and val[-1] == '"': + if len(val) > 1 and val[0] == '"' and val[-1] == '"': return val[1:-1].replace('""', '"') if val.find('"') > 0: raise Exception('unsupported syntax') |