Hi Shane, Gina,

About
http://todotxt.com/library/todo.sh/todo.py


When the done.txt file is non existant because no tasks have been done yet, the report command exit with an error.

% ls /Users/karl/todo
todo.txt

% python todo.py report
Traceback (most recent call last):
  File "todo.py", line 337, in <module>
    report()
  File "todo.py", line 263, in report
    archive()
  File "todo.py", line 161, in archive
    done = getDoneDict()
  File "todo.py", line 121, in getDoneDict
    for line in open(DONE_FILE).readlines():
IOError: [Errno 2] No such file or directory: '/Users/karl/todo/ done.txt'


You could refactor the program with
        try, except methods.

Here a diff for one rewritten function.

Attachment: todo.diff
Description: Binary data



Best Regards.

--
Karl Dubost - http://www.w3.org/People/karl/
W3C Conformance Manager, QA Activity Lead
  QA Weblog - http://www.w3.org/QA/
     *** Be Strict To Be Cool ***



Reply via email to