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 return False
def _load(self): def _load(self):
file_handle = None
try:
if not os.path.isfile(self.file_name): if not os.path.isfile(self.file_name):
return False return False
file_handle = None
try:
file_handle = open(self.file_name, u'r') file_handle = open(self.file_name, u'r')
self.config.readfp(file_handle) self.config.readfp(file_handle)
return True return True