Skip to content

Commit c118723

Browse files
committed
Remove duplicate Austrian post offices
1 parent 1a87baf commit c118723

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

update/at_postleitzahl.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# update/at_postleitzahl.py - download list of Austrian postal codes
55
#
6-
# Copyright (C) 2018-2021 Arthur de Jong
6+
# Copyright (C) 2018-2025 Arthur de Jong
77
#
88
# This library is free software; you can redistribute it and/or
99
# modify it under the terms of the GNU Lesser General Public
@@ -54,9 +54,9 @@
5454
print('# version %s published %s' % (
5555
data['version']['id'], data['version']['published']))
5656
# build an ordered list of postal codes
57-
results = []
57+
results = set()
5858
for row in data['data']:
5959
if row['adressierbar'] == 'Ja':
60-
results.append((str(row['plz']), row['ort'], regions[row['bundesland']]))
60+
results.add((str(row['plz']), row['ort'], regions[row['bundesland']]))
6161
for code, location, region in sorted(results):
6262
print('%s location="%s" region="%s"' % (code, location, region))

0 commit comments

Comments
 (0)