Skip to content

Commit

Permalink
Merged kfsone/tradedangerous into master
Browse files Browse the repository at this point in the history
  • Loading branch information
orphu committed Dec 6, 2014
2 parents 714f007 + 5457f0b commit 7ae95c5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
14 changes: 7 additions & 7 deletions cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,21 +303,21 @@ def changeStation(matches):
if stationID < 0:
try:
correctName = corrections.systems[systemName]
if correction == DELETED:
if correctName == DELETED:
tdenv.DEBUG1("DELETED: {}", systemName)
stationID = correction
stationID = DELETED
return
systemName = correction.upper()
systemName = correctName.upper()
except KeyError:
pass
try:
key = systemName + "/" + stationName.upper()
correction = corrections.stations[key]
if correction == DELETED:
correctName = corrections.stations[key]
if correctName == DELETED:
tdenv.DEBUG1("DELETED: {}", key)
stationID = correction
stationID = DELETED
return
stationName = correction.upper()
stationName = correctName.upper()
except KeyError:
pass
facility = systemName + '/' + stationName
Expand Down
2 changes: 1 addition & 1 deletion formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def append(self, column, after=None):
if after:
for idx, col in enumerate(columns, 1):
if col.name == after:
columns.insert(idx, newColumn)
columns.insert(idx, column)
return self
columns.append(column)
return self
Expand Down
2 changes: 1 addition & 1 deletion trade.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

from __future__ import absolute_import, with_statement, print_function, division, unicode_literals
import os
import commands
from commands import *
import tradedb

######################################################################
Expand Down
1 change: 1 addition & 0 deletions tradedb.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ def lookupSystemRelaxed(self, key):
return place
except AmbiguityError as e:
# See if the ambiguity resolves down to a single system.
systems = set()
for candidate in e.anyMatch:
if isinstance(candidate, Station):
systems.add(candidate.system)
Expand Down

0 comments on commit 7ae95c5

Please sign in to comment.