diff options
author | Marko Kreen | 2010-06-01 13:55:29 +0000 |
---|---|---|
committer | Marko Kreen | 2010-06-09 14:51:01 +0000 |
commit | 37816d9db2278887808ba153a5f4ce84bea7f17b (patch) | |
tree | a7d9e1d5240286bc8d726f91eae9d7092de21d23 /python/skytools/sqltools.py | |
parent | 31343e848eb78bafa1287a77358481e847bb3e99 (diff) |
skytools.DBObject: remove duplicated file find logic
Diffstat (limited to 'python/skytools/sqltools.py')
-rw-r--r-- | python/skytools/sqltools.py | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/python/skytools/sqltools.py b/python/skytools/sqltools.py index 76d73efa..197bbe15 100644 --- a/python/skytools/sqltools.py +++ b/python/skytools/sqltools.py @@ -437,20 +437,7 @@ class DBObject(object): def find_file(self): """Find install script file.""" - full_fn = None - if self.sql_file[0] == "/": - full_fn = self.sql_file - else: - dir_list = skytools.installer_config.sql_locations - for fdir in dir_list: - fn = os.path.join(fdir, self.sql_file) - if os.path.isfile(fn): - full_fn = fn - break - - if not full_fn: - raise Exception('File not found: '+self.sql_file) - return full_fn + return installer_find_file(self.sql_file) class DBSchema(DBObject): """Handles db schema.""" |