catch any load error for config file

This commit is contained in:
Damien Elmes 2009-09-27 00:05:02 +09:00
parent 24b8ddce29
commit 3a43f02903

View file

@ -150,7 +150,7 @@ class Config(dict):
try: try:
f = open(db) f = open(db)
self.update(cPickle.load(f)) self.update(cPickle.load(f))
except (IOError, EOFError): except:
# config file was corrupted previously # config file was corrupted previously
pass pass
self.defaults() self.defaults()