Changeset 2475d74 in osmose-backend


Ignore:
Timestamp:
Jun 8, 2014 9:39:11 PM (5 years ago)
Author:
Jocelyn Jaubert <jocelyn.jaubert@…>
Branches:
master
Children:
a67f3cf
Parents:
0801116
git-author:
Jocelyn Jaubert <jocelyn.jaubert@…> (08/06/2014 21:39:03)
git-committer:
Jocelyn Jaubert <jocelyn.jaubert@…> (08/06/2014 21:39:11)
Message:

Download taginfo bdd in init of plugin TagMissing_LookLike

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/TagMissing_LookLike.py

    r53f7279 r2475d74  
    2121 
    2222from plugins.Plugin import Plugin 
     23from modules.downloader import update_cache 
    2324import os 
    2425import sqlite3 
     
    8384        self.errors[2070] = {"item": 2070, "level": 2, "tag": ["tag", "fix:chair"], "desc": T_(u"Missing tag by cooccurrence") } 
    8485 
    85         if not os.path.exists('taginfo-db.db'): 
     86        bdd = update_cache("http://taginfo.openstreetmap.org/download/taginfo-db.db.bz2", 30, bz2_decompress=True) 
     87 
     88        if not os.path.exists(bdd): 
    8689            self.info = {} 
    8790            for type in ['nodes', 'ways', 'relations']: 
     
    9093 
    9194        # Taginfo wiki extract database 
    92         # http://taginfo.openstreetmap.org/download/taginfo-db.db.bz2 
    93         con = sqlite3.connect('taginfo-db.db') 
     95        con = sqlite3.connect(bdd) 
    9496 
    9597        with con: 
Note: See TracChangeset for help on using the changeset viewer.