Skip to content

Commit

Permalink
0 means zero, for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Smith committed Dec 18, 2014
1 parent fc02865 commit b994198
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,10 @@ def parseSupply(pricesFile, lineNo, category, reading):
))
try:
unitsNo = int(units)
if unitsNo <= 0:
if unitsNo < 0:
raise ValueError("unsigned unit count")
if unitsNo == 0:
return 0, 0
return unitsNo, levelNo
except ValueError:
pass
Expand Down

0 comments on commit b994198

Please sign in to comment.