Egad fails ungracefully if the output directory already exists
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Egad |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
If you have already created the output directory (maybe as a result of an interrupted run) then Egad crashes.
A warning and offer to change the directory name would be more friendly.
~$ python bzr/egad/Egad.py treebank/
Traceback (most recent call last):
File "bzr/egad/Egad.py", line 73, in <module>
main()
File "bzr/egad/Egad.py", line 70, in main
instance = EgadCLI(job)
File "bzr/egad/Egad.py", line 10, in __init__
self.
File "/home/
os.
File "/usr/lib/
mkdir(name, mode)
OSError: [Errno 17] File exists: '/home/
Fixed in r12.
Egad now prompts if you want to overwrite the directory. If yes, the existing directory will be deleted and a new one will be created. Be careful not to overwrite directories you don't want to lose.
Alternatively, you can run Egad with the -F or --overwrite flags, thus avoiding the prompt, and forcing Egad to overwrite if necessary.