Commit ca2049ab by Julian Arni

Fixes extra 'file' that was leftover locally after import

parent 2c0a08f7
...@@ -60,7 +60,7 @@ def import_course(request, org, course, name): ...@@ -60,7 +60,7 @@ def import_course(request, org, course, name):
`filename` is truncted on creation. Additionally removes dirname on `filename` is truncted on creation. Additionally removes dirname on
exit. exit.
""" """
open("file", "w").close() open(filename, "w").close()
try: try:
yield filename yield filename
finally: finally:
...@@ -90,7 +90,7 @@ def import_course(request, org, course, name): ...@@ -90,7 +90,7 @@ def import_course(request, org, course, name):
try: try:
matches = CONTENT_RE.search(request.META["HTTP_CONTENT_RANGE"]) matches = CONTENT_RE.search(request.META["HTTP_CONTENT_RANGE"])
content_range = matches.groupdict() content_range = matches.groupdict()
except KeyError: # Single chunk except KeyError: # Single chunk
# no Content-Range header, so make one that will work # no Content-Range header, so make one that will work
content_range = {'start': 0, 'stop': 1, 'end': 2} content_range = {'start': 0, 'stop': 1, 'end': 2}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment