isfile test doesn't need try

This commit is contained in:
Jon Tibble 2009-11-12 23:46:20 +00:00
parent 1c92f157c7
commit b6eadecb46

View File

@ -101,10 +101,10 @@ class Registry(object):
return False
def _load(self):
if not os.path.isfile(self.file_name):
return False
file_handle = None
try:
if not os.path.isfile(self.file_name):
return False
file_handle = open(self.file_name, u'r')
self.config.readfp(file_handle)
return True