pymssql/pymssql — pull request #168 by msabramo (2014-01-09 21:33:49+00:00)
Title: pymssql.pyx: Check self.description not None before looking at column names

Prevents errors or crashes when as_dict=True and executing queries with no results like CREATE TABLE, INSERT, etc. This problem was introduced by #160, because I forgot to check that `self.description is not None`.

E.g.:

```python
>>> cursor = conn.cursor(as_dict=True)
>>> cursor.execute("""
... CREATE TABLE dates_and_times (
... datetime DATETIME,
... date DATE,
... time TIME,
... )
... """)
Traceback (most recent call last):
File "", line 7, in
File "pymssql.pyx", line 424, in pymssql.Cursor.execute (pymssql.c:5808)
if len(column_descriptor[0]) == 0
TypeError: 'type' object has no attribute '__getitem__'
```