diff --git a/CHANGES.txt b/CHANGES.txt index be73c1e1..0a76678a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,9 @@ TradeDangerous, Copyright (C) Oliver "kfsone" Smith, July 2014 ============================================================================== +[wip] +. (kfsone) Fixed 'set changed size' error in run command + v6.9.2 Feb 08 2015 . (kfsone) Feature #158 Find rares based on distance from multiple systems "--away " and "--from --from ..." diff --git a/commands/run_cmd.py b/commands/run_cmd.py index 844531a2..5567bc96 100644 --- a/commands/run_cmd.py +++ b/commands/run_cmd.py @@ -461,12 +461,12 @@ def checkStationSuitability(cmdenv, station, src=None): def filterStationSet(src, cmdenv, stnSet): if not stnSet: return stnSet - for place in stnSet: - if not isinstance(place, Station): - continue - if not checkStationSuitability(cmdenv, place): - stnSet.remove(place) - continue + unsuited = set( + place for place in stnSet + if isinstance(place, Station) and \ + not checkStationSuitability(cmdenv, place) + ) + stnSet -= unsuited if not stnSet: raise CommandLineError( "No {} station met your criteria.".format(