Skip to content

Commit

Permalink
fix export of the countries.get_by_id
Browse files Browse the repository at this point in the history
  • Loading branch information
rp- committed Mar 28, 2016
1 parent 259beb8 commit d08aa4f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tools/pydcs_export.lua
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ while i <= country.maxIndex do
if c then
local pyName = c.Name
pyName = string.gsub(pyName, "[-()/., *']", "")
writeln(file, ' '..pyName..'.id: '..pyName..'(),')
writeln(file, ' '..pyName..'.id: '..pyName..',')
end
i = i + 1
end
Expand All @@ -836,6 +836,14 @@ writeln(file, [[
def get_by_id(_id: int):
return country_dict[_id]
"""Returns a new country object for the given country id
Args:
_id: id for the country
Returns:
Country: a new country object
"""
return country_dict[_id]()
]])
file:close()

0 comments on commit d08aa4f

Please sign in to comment.