Skip to content

Commit

Permalink
Allow user to provide a single or a list of dataset years to download
Browse files Browse the repository at this point in the history
  • Loading branch information
Irio committed Jul 7, 2017
1 parent ac8fa2b commit f370b54
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion serenata_toolbox/chamber_of_deputies/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Dataset:

def __init__(self, path, years=AVAILABLE_YEARS):
self.path = path
self.years = years
self.years = years if isinstance(years, list) else [years]

def fetch(self):
base_url = "http://www.camara.leg.br/cotas/Ano-{}.csv.zip"
Expand Down
2 changes: 1 addition & 1 deletion serenata_toolbox/federal_senate/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Dataset:

def __init__(self, path, years=AVAILABLE_YEARS):
self.path = path
self.years = years
self.years = years if isinstance(years, list) else [years]

def fetch(self):
retrieved_files = []
Expand Down

0 comments on commit f370b54

Please sign in to comment.