+# User agent:
+class YarrgURLopener(urllib.FancyURLopener):
+ base_version= urllib.URLopener().version
+ proc= subprocess.Popen(
+ ["./database-info-fetch", "useragentstringmap",
+ base_version, "manual islands/topology fetch"],
+ shell=False,
+ stderr=None,
+ stdout=subprocess.PIPE,
+ )
+ version = proc.communicate()[0].rstrip('\n');
+ assert(proc.returncode is not None and proc.returncode == 0)
+urllib._urlopener = YarrgURLopener()
+