- From: Karl Dubost <karl@w3.org>
- Date: Wed, 17 Jan 2007 14:55:31 +0900
- To: shane.koster@gmail.com, ginatrapani@gmail.com
- Cc: www-archive@w3.org
Received on Wednesday, 17 January 2007 05:56:17 UTC
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.
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 ***
Received on Wednesday, 17 January 2007 05:56:17 UTC