learningequality/ka-lite — pull request #480 by bcipolli (2013-08-14 03:57:31+00:00)
Title: fixing __file__ reference in cronserver.py

Aimed to fix the following intermittent exception (first reported by @gimick):

[13/Aug/2013 18:43:50] "GET /securesync/api/status?_=1376444630348 HTTP/1.1" 200 134
Exception in thread Thread-2:
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 808, in __bootstrap_inner
self.run()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 1080, in run
self.function(*self.args, **self.kwargs)
File "cronserver.py", line 15, in cron
subprocess.call([sys.executable, os.path.join(os.path.dirname(__file__), "manage.py"), "cron"])
NameError: global name '__file__' is not defined