Issue with git pull

When tasks.py file is updated and I'm executing git pull on server, then celery crashes.

This is because git pull first removes old file and then recreates it, but pyinotify catches file removal event.

This update first verify if file exist and only then marks file as modified and reloads it.

Error dump:
[2013-04-02 20:29:45,527: WARNING/MainProcess] 'Autoreloader' crashed: IOError(2, 'No such file or directory')
[2013-04-02 20:29:45,527: WARNING/MainProcess] Traceback (most recent call last):
[2013-04-02 20:29:45,527: WARNING/MainProcess] File "/home/django/.virtualenv/rop/local/lib/python2.7/site-packages/celery/utils/threads.py", line 72, in run
[2013-04-02 20:29:45,528: WARNING/MainProcess] body()
[2013-04-02 20:29:45,528: WARNING/MainProcess] File "/home/django/.virtualenv/rop/local/lib/python2.7/site-packages/celery/worker/autoreload.py", line 251, in body
[2013-04-02 20:29:45,528: WARNING/MainProcess] self._monitor.start()
[2013-04-02 20:29:45,529: WARNING/MainProcess] File "/home/django/.virtualenv/rop/local/lib/python2.7/site-packages/celery/worker/autoreload.py", line 179, in start
[2013-04-02 20:29:45,529: WARNING/MainProcess] self._notifier.loop()
[2013-04-02 20:29:45,529: WARNING/MainProcess] File "/home/django/.virtualenv/rop/local/lib/python2.7/site-packages/pyinotify.py", line 1400, in loop
[2013-04-02 20:29:45,530: WARNING/MainProcess] self.process_events()
[2013-04-02 20:29:45,530: WARNING/MainProcess] File "/home/django/.virtualenv/rop/local/lib/python2.7/site-packages/pyinotify.py", line 1295, in process_events
[2013-04-02 20:29:45,531: WARNING/MainProcess] self._default_proc_fun(revent)
[2013-04-02 20:29:45,531: WARNING/MainProcess] File "/home/django/.virtualenv/rop/local/lib/python2.7/site-packages/pyinotify.py", line 937, in __call__
[2013-04-02 20:29:45,531: WARNING/MainProcess] return _ProcessEvent.__call__(self, event)
[2013-04-02 20:29:45,531: WARNING/MainProcess] File "/home/django/.virtualenv/rop/local/lib/python2.7/site-packages/pyinotify.py", line 662, in __call__
[2013-04-02 20:29:45,532: WARNING/MainProcess] return meth(event)
[2013-04-02 20:29:45,532: WARNING/MainProcess] File "/home/django/.virtualenv/rop/local/lib/python2.7/site-packages/celery/worker/autoreload.py", line 190, in process_
[2013-04-02 20:29:45,532: WARNING/MainProcess] self.on_change([event.path])
[2013-04-02 20:29:45,532: WARNING/MainProcess] File "/home/django/.virtualenv/rop/local/lib/python2.7/site-packages/celery/worker/autoreload.py", line 196, in on_change
[2013-04-02 20:29:45,532: WARNING/MainProcess] return self._on_change(modified)
[2013-04-02 20:29:45,533: WARNING/MainProcess] File "/home/django/.virtualenv/rop/local/lib/python2.7/site-packages/celery/worker/autoreload.py", line 261, in on_change
[2013-04-02 20:29:45,533: WARNING/MainProcess] modified = [f for f in files if self._maybe_modified(f)]
[2013-04-02 20:29:45,533: WARNING/MainProcess] File "/home/django/.virtualenv/rop/local/lib/python2.7/site-packages/celery/worker/autoreload.py", line 254, in _maybe_modified
[2013-04-02 20:29:45,533: WARNING/MainProcess] digest = file_hash(f)
[2013-04-02 20:29:45,533: WARNING/MainProcess] File "/home/django/.virtualenv/rop/local/lib/python2.7/site-packages/celery/worker/autoreload.py", line 63, in file_hash
[2013-04-02 20:29:45,534: WARNING/MainProcess] with open(filename, 'rb') as f:
[2013-04-02 20:29:45,534: WARNING/MainProcess] IOError: [Errno 2] No such file or directory: '/home/django/rop/submission/tasks.py'