Skip to content

Commit

Permalink
Fix for Samoa data
Browse files Browse the repository at this point in the history
  • Loading branch information
markbrough committed May 19, 2017
1 parent 4c694dc commit 6773067
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scraper.py
Expand Up @@ -23,6 +23,8 @@ def clean_fy(value):
if value == "NA": return "Unknown"
fy_start, fy_end = value.split("-")
day, month = fy_start.strip().split(" ")
# Samoa says "June 1" - so switch around
if len(month)<3: day, month = month, day
if len(day)==1:
return "0{} {}".format(day, month)
return fy_start.strip()
Expand All @@ -33,6 +35,7 @@ def init_git_repo():
git.remote('add', 'origin', 'https://{}@github.com/markbrough/country-fiscal-years.git'.format(environ.get('MORPH_GH_API_KEY')))
try:
git.pull('origin', 'update')
git.checkout(b='update')
except:
git.pull('origin', 'gh-pages')
git.checkout(b='update')
Expand Down

0 comments on commit 6773067

Please sign in to comment.