зеркало из https://github.com/github/vitess-gh.git
Back to exception and add more information.
This commit is contained in:
Родитель
4ab1c1d5db
Коммит
1be23db75f
|
@ -102,9 +102,11 @@ class LocalDatabase(object):
|
|||
for keyspace in set([shard.keyspace for shard in self.shards]):
|
||||
keyspace_dir = os.path.join(self.schema_dir, keyspace)
|
||||
if not os.path.isdir(keyspace_dir):
|
||||
logging.warn('No subdirectory found in schema dir %s for keyspace %s.',
|
||||
keyspace, keyspace_dir)
|
||||
continue
|
||||
raise Exception('No subdirectory found in schema dir %s for keyspace %s. '
|
||||
'For keyspaces without an initial schema, create the '
|
||||
'directory %s and leave a README file to explain why the '
|
||||
'directory exists.' %
|
||||
(self.schema_dir, keyspace, keyspace_dir))
|
||||
|
||||
for filepath in glob.glob(os.path.join(keyspace_dir, '*.sql')):
|
||||
logging.info('Loading schema for keyspace %s from file %s',
|
||||
|
|
Загрузка…
Ссылка в новой задаче