iemejia / catho

A file catalog utility inspired by the awesome Robert Vasicek's Cathy project. Or my excuse to hack something that I really need.
GNU Lesser General Public License v3.0
6 stars 1 forks source link

add before init is not fatal error #40

Open rgamez opened 11 years ago

rgamez commented 11 years ago

if ~/.catho doesn't exist because catho init hasn't been executed, errors are displayed but the parsing of the directory continues.

$ ~/catho/catho/catho.py add Home ~
Creating catalog: Home
An error occurred: unable to open database file
An error occurred: unable to open database file
An error occurred: unable to open database file
$ ls ~/.catho
ls: cannot access ~/.catho: No such file or directory

Two options/suggestions @iemejia

iemejia commented 11 years ago

both solutions are good, but what i would like is to avoid repeating is the touch code everywhere, or the validation error in case of not init executed (can we solve this in a general way?, maybe with a decorator?), for me touching the folder is better, and maybe that will make the init option to be useless. (less options = better)