refactoring

This commit is contained in:
frankknoll
2022-11-22 14:25:36 +01:00
parent e0a86efa96
commit 8d1f38dfb6
4 changed files with 51 additions and 77 deletions

10
src/HtmlUtils.py Normal file
View File

@@ -0,0 +1,10 @@
def getCountryOptions(countries):
return ['<option value="Global" selected>Global</option>'] + _getCountryOptions(countries)
def _getCountryOptions(countries):
return [_getCountryOption(country) for country in countries]
def _getCountryOption(country):
return '<option value="{country}">{country}</option>'.format(country=country)