Skip to content

Commit

Permalink
BLS: fix code filename for dataset 'ce'
Browse files Browse the repository at this point in the history
  • Loading branch information
Michel Juillard committed Feb 28, 2017
1 parent 28b6860 commit 988dec7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dlstats/fetchers/bls.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ def __init__(self, **kwargs):

self.categories_filter = []

# TO BE DONE
def build_data_tree(self):
"""Build data_tree from BLS site parsing
"""
Expand Down Expand Up @@ -533,8 +532,12 @@ def get_code_list(self):
"""Gets all code lists in a dataset directory
Returns a dict of dict of dict
"""
filenames = self.dataset.dimension_keys + ['footnote']
if self.dataset_code == 'ce' and 'data_type' in filenames:
idx = filenames.index('data_type')
filenames[idx] = 'datatype'
code_list = {k: self.get_dimension_data(self.dataset_code + '.' + k)
for k in self.dataset.dimension_keys + ['footnote']
for k in filenames
if k != 'seasonal' and k != 'base_period'}
# dimensions that often don't have a code file
if 'seasonal' not in code_list:
Expand Down

0 comments on commit 988dec7

Please sign in to comment.