1
0
Fork 0

don't try to spilt None - fixes AttributeError: 'NoneType' object has no attribute 'split' on special commands like \?

This commit is contained in:
darikg 2015-01-14 07:51:16 -05:00
parent 72ab7f6e87
commit 1e263f1a03
1 changed files with 3 additions and 0 deletions

View File

@ -283,6 +283,9 @@ def need_completion_refresh(sql):
return False
def is_mutating(status):
if not status:
return False
mutating = ['insert', 'update', 'delete', 'alter', 'create', 'drop']
return status.split(None, 1)[0].lower() in mutating