burnash/gspread — Issue #9: Catch get_worksheet() error
Author: ac001
Created: 2012-01-04 02:52:14+00:00
State: open

spreadsheet.get_worksheet() throws an error.

Should either
return None (preffered by me)
or throw and exception

for m in range(1, 13):

sheet = spreadsheet.get_worksheet(m)
cell = sheet.cell(1,1)

File "./xxl.py", line 64, in
sheet = spreadsheet.get_worksheet(m)
File "gspread/models.py", line 86, in get_worksheet
return self._sheet_list[index]
IndexError: list index out of range