]>
git.ipfire.org Git - people/shoehn/ipfire.org.git/blob - tools/migrate-fireinfo.py
9 "wilhelmina.ipfire.org",
13 connection
= pymongo
.Connection(DATABASE_HOSTS
)
14 db
= connection
["stasy"]
16 b
= backend
.Backend("webapp.conf")
18 c
= db
.archives
.find().sort("updated", pymongo
.ASCENDING
)
21 public_id
= profile
.get("public_id")
22 when
= profile
.get("updated")
27 if profile
.has_key("geoip") and profile
["geoip"]:
28 location
= profile
["geoip"]["country_code"]
30 print "Importing profile %s..." % public_id
32 b
.fireinfo
.handle_profile(public_id
, profile
, location
=location
, when
=when
)