Skip to content

Instantly share code, notes, and snippets.

@Tyderion
Created November 15, 2012 18:31
Show Gist options
  • Save Tyderion/4080313 to your computer and use it in GitHub Desktop.
Save Tyderion/4080313 to your computer and use it in GitHub Desktop.
SublimeTODO Error and fix
except IOError:
## Probably a broken symlink
f = None # Instead of pass
finally:
self.file_counter.increment()
if f is not None:
f.close()
Traceback (most recent call last):
File ".\threading.py", line 532, in __bootstrap_inner
File "./todo.py", line 293, in run
rendered = list(self.renderer.format(todos))
File "./todo.py", line 230, in format
messages = sorted(messages, key=key_func)
File "./todo.py", line 188, in extract
f.close()
UnboundLocalError: local variable 'f' referenced before assignment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment