Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
Get rid of magic numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
robyoung committed Jul 29, 2013
1 parent 7e514b4 commit c1368d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backdrop/core/parse_excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def _extract_values(row, book):


def _extract_cell_value(cell, book):
if cell.ctype == 3:
if cell.ctype == xlrd.XL_CELL_DATE:
time_tuple = xlrd.xldate_as_tuple(cell.value, book.datemode)
return utc(datetime.datetime(*time_tuple))
elif cell.ctype == 5:
elif cell.ctype == xlrd.XL_CELL_ERROR:
raise ParseError("Error encountered in cell")
return cell.value

1 comment on commit c1368d6

@norm
Copy link
Contributor

@norm norm commented on c1368d6 Jul 29, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<3

Please sign in to comment.