Changeset 93b6f67 in osmose-backend


Ignore:
Timestamp:
Jan 31, 2013 9:20:26 PM (7 years ago)
Author:
Jocelyn Jaubert <jocelyn.jaubert@…>
Branches:
master
Children:
d39a323
Parents:
264e583
git-author:
Jocelyn Jaubert <jocelyn.jaubert@…> (31/01/2013 21:18:01)
git-committer:
Jocelyn Jaubert <jocelyn.jaubert@…> (31/01/2013 21:20:26)
Message:

Fix propagation of analyser_options in osmose_config for France

File:
1 edited

Legend:

Unmodified
Added
Removed
  • osmose_config.py

    r249fa77 r93b6f67  
    8383    db_schema   = None 
    8484 
    85     def __init__(self, country, polygon_id=None, analyser_options={}, download_repo=GEOFABRIK): 
     85    def __init__(self, country, polygon_id=None, analyser_options=None, download_repo=GEOFABRIK): 
    8686        config[country] = self 
    8787        self.country          = country 
     
    9090        self.download_repo    = download_repo 
    9191        self.analyser         = OrderedDict() 
    92         self.analyser_options = {} 
     92        if analyser_options: 
     93            self.analyser_options = analyser_options 
     94        else: 
     95            self.analyser_options = None 
    9396 
    9497    def init(self): 
     
    125128 
    126129class default_country_simple(template_config): 
    127     def __init__(self, part, country, polygon_id=None, analyser_options={}, 
     130    def __init__(self, part, country, polygon_id=None, analyser_options=None, 
    128131                 download_repo=GEOFABRIK, download_country=None): 
    129132 
     
    167170 
    168171class default_country(default_country_simple): 
    169     def __init__(self, part, country, polygon_id=None, analyser_options={}, 
     172    def __init__(self, part, country, polygon_id=None, analyser_options=None, 
    170173                 download_repo=GEOFABRIK, download_country=None): 
    171174 
     
    177180 
    178181class default_country_fr(default_country): 
    179     def __init__(self, part, country, polygon_id=None, analyser_options={}, 
     182    def __init__(self, part, country, polygon_id=None, analyser_options=None, 
    180183                 download_repo=GEOFABRIK, download_country=None): 
    181184 
     185        if not analyser_options: 
     186            analyser_options = {} 
    182187        analyser_options.update({"country": "FR", "language": "fr"}) 
    183188        default_country.__init__(self, part, country, polygon_id, analyser_options, 
     
    185190 
    186191class france_region(default_country_fr): 
    187     def __init__(self, part, region, polygon_id=None, analyser_options={}, 
     192    def __init__(self, part, region, polygon_id=None, analyser_options=None, 
    188193                 download_repo=GEOFABRIK, download_country=None): 
    189194 
Note: See TracChangeset for help on using the changeset viewer.