Skip to content

Commit

Permalink
fetch_old_gci_task_data: Fix command
Browse files Browse the repository at this point in the history
The command had missing imports and incorrectly used
yaml.

Related to coala#3
  • Loading branch information
jayvdb committed Dec 17, 2017
1 parent 890cafa commit 56a5e65
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gci/management/commands/fetch_old_gci_task_data.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os.path

import requests

from django.core.management.base import BaseCommand
Expand All @@ -20,10 +22,10 @@ def handle(self, *args, **options):
r.raise_for_status()

with open(os.path.join(output_dir, 'tasks.yaml'), 'w') as f:
yaml.dump(r.content, f)
f.write(r.content)

r = requests.get(deploy_url + '/static/instances.yaml')
r.raise_for_status()

with open(os.path.join(output_dir, 'instances.yaml'), 'w') as f:
yaml.dump(r.content, f)
f.write(r.content)

0 comments on commit 56a5e65

Please sign in to comment.