Skip to content

Commit

Permalink
Fixed issue with EDAPI plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
kfsone committed Jul 22, 2015
1 parent 40a5f03 commit f6e4298
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
TradeDangerous, Copyright (C) Oliver "kfsone" Smith, July 2014
==============================================================================

v7.3.1 Jul 21 2015:
. (kfsone) Fix for edapi.

Jul 07 2015:
. (kfsone) Fixed division by zero in transfers.py with empty file

Expand Down
4 changes: 2 additions & 2 deletions plugins/edapi_plug.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,15 +604,15 @@ def run(self):
f.write("\t+ {}\n".format(commodity['categoryname']))

# If stock is zero, list it as unavailable.
if commodity['stock'] == 0:
if commodity['stock'] or 0 == 0:
commodity['stock'] = '-'
else:
demand = bracket_levels[int(commodity['stockBracket'])]
commodity['stock'] = str(int(commodity['stock']))+demand

# If demand is zero, zero out the sell price.
if (commodity['demand'] == 0 or
commodity['demandBracket'] == 0
commodity['demandBracket'] or 0 == 0
):
commodity['demand'] = '?'
commodity['sellPrice'] = 0
Expand Down

0 comments on commit f6e4298

Please sign in to comment.