[cindex.py] fix infinite iteration of compilation database CompileCommands

Patch by David Röthlisberger

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159926 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/bindings/python/clang/cindex.py b/bindings/python/clang/cindex.py
index afbfe3d..0aea466 100644
--- a/bindings/python/clang/cindex.py
+++ b/bindings/python/clang/cindex.py
@@ -2162,7 +2162,7 @@
 
     def __getitem__(self, i):
         cc = CompileCommands_getCommand(self.ccmds, i)
-        if cc is None:
+        if not cc:
             raise IndexError
         return CompileCommand(cc, self)