]> git.ipfire.org Git - location/libloc.git/commitdiff
importer: Import all sources in alphabetical order
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 12 Aug 2022 15:49:13 +0000 (15:49 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 12 Aug 2022 15:49:13 +0000 (15:49 +0000)
To generate deterministic results

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/scripts/location-importer.in

index 22c7b35da82978f042d552130d590fdf8984c44e..17857919c63d995681e93b02c7031bd0035022d5 100644 (file)
@@ -411,7 +411,7 @@ class CLI(object):
                validcountries = self.countries
 
                # Iterate over all potential sources
-               for source in location.importer.SOURCES:
+               for source in sorted(location.importer.SOURCES):
                        with self.db.transaction():
                                # Create some temporary tables to store parsed data
                                self.db.execute("""