]> git.ipfire.org Git - people/ms/libloc.git/commitdiff
python example script: Add country name and continent code.
authorStefan Schantl <stefan.schantl@ipfire.org>
Thu, 10 Sep 2020 15:57:45 +0000 (17:57 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 10 Sep 2020 16:12:05 +0000 (16:12 +0000)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
examples/python/create-database.py

index bf8838bdce235b1fe86fd4001de85a4c9b981193..04b2dc3272eda84e83538bf73b905109165fab14 100644 (file)
@@ -22,6 +22,8 @@ with open(private_key_path, "r") as pkey:
 
     # Add a country
     c = w.add_country("DE")
+    c.continent_code = "EU"
+    c.name = "Germany"
 
     # Add an AS
     a = w.add_as(204867)