Skip to content
This repository was archived by the owner on Feb 10, 2023. It is now read-only.

Commit 2dff6b5

Browse files
committed
Bug fix: handle schemas with no tables
1 parent 8cf1234 commit 2dff6b5

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

athena_cli.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
LESS = "less -FXRSn"
2121
HISTORY_FILE_SIZE = 500
2222

23-
__version__ = '0.1.0'
23+
__version__ = '0.1.1'
2424

2525

2626
class AthenaBatch(object):
@@ -195,7 +195,7 @@ def default(self, line):
195195
headers = [h['Name'] for h in results['ResultSet']['ResultSetMetadata']['ColumnInfo']]
196196
row_count = len(results['ResultSet']['Rows'])
197197

198-
if headers and results['ResultSet']['Rows'][0]['Data'][0].get('VarCharValue', None) == headers[0]:
198+
if headers and len(results['ResultSet']['Rows']) and results['ResultSet']['Rows'][0]['Data'][0].get('VarCharValue', None) == headers[0]:
199199
row_count -= 1 # don't count header
200200

201201
process = subprocess.Popen(self.pager, stdin=subprocess.PIPE)

pypi.md

+3
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
$ python setup.py bdist_wheel --universal
33
$ twine upload dist/athena_cli-0.0.x-py2.py3-none-any.whl
44
```
5+
```
6+
$ python setup.py sdist bdist_wheel upload
7+
```

setup.cfg

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[wheel]
2+
universal = 1

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
from setuptools import setup, find_packages
33

4-
version = '0.1.0'
4+
version = '0.1.1'
55

66
setup(
77
name="athena-cli",

0 commit comments

Comments
 (0)