Skip to content

Commit

Permalink
removed repeated snippet of code on g_octave/config.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelmartins committed Dec 25, 2009
1 parent b98e87d commit 26b9eac
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions g_octave/config.py
Expand Up @@ -54,8 +54,6 @@ def __init__(self, fetch_phase=False):
self.__info = simplejson.load(fp)
fp.close()

self.__check_dirs()


def __getattr__(self, attr):

Expand All @@ -67,19 +65,7 @@ def __getattr__(self, attr):
return self.__cache['files']
else:
raise ConfigException('Invalid option: %s' % attr)


def __check_dirs(self):

dirs = [
self.__config.get(self.__section_name, 'db'),
self.__config.get(self.__section_name, 'overlay')
]

for dir in dirs:
if not os.path.isdir(dir):
os.makedirs(dir, 0755)



if __name__ == '__main__':
conf = Config()
Expand Down

0 comments on commit 26b9eac

Please sign in to comment.