cosmetic output tweak on test startup

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30342 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 715c319c
...@@ -15,12 +15,12 @@ save = int(os.environ.get('erp5_save_data_fs', 0)) ...@@ -15,12 +15,12 @@ save = int(os.environ.get('erp5_save_data_fs', 0))
if load: if load:
dump_sql = os.path.join(instance_home, 'dump.sql') dump_sql = os.path.join(instance_home, 'dump.sql')
if os.path.exists(dump_sql): if os.path.exists(dump_sql):
print("Restoring MySQL database ... ") print "Restoring MySQL database ... ",
ret = os.system("mysql %s < %s" % (getMySQLArguments(), dump_sql)) ret = os.system("mysql %s < %s" % (getMySQLArguments(), dump_sql))
assert not ret assert not ret
else: else:
os.environ['erp5_tests_recreate_catalog'] = '1' os.environ['erp5_tests_recreate_catalog'] = '1'
print("Restoring static files ... ") print "Restoring static files ... ",
for dir in ('Constraint', 'Document', 'PropertySheet', 'Extensions'): for dir in ('Constraint', 'Document', 'PropertySheet', 'Extensions'):
if os.path.exists(os.path.join(instance_home, '%s.bak' % dir)): if os.path.exists(os.path.join(instance_home, '%s.bak' % dir)):
full_path = os.path.join(instance_home, dir) full_path = os.path.join(instance_home, dir)
...@@ -28,7 +28,7 @@ if load: ...@@ -28,7 +28,7 @@ if load:
shutil.copytree(os.path.join(instance_home, '%s.bak' % dir), shutil.copytree(os.path.join(instance_home, '%s.bak' % dir),
full_path, symlinks=True) full_path, symlinks=True)
else: else:
print("Cleaning static files at %s ... " % instance_home) print "Cleaning static files at %s ... " % instance_home,
for dir in ('Constraint', 'Document', 'PropertySheet', 'Extensions'): for dir in ('Constraint', 'Document', 'PropertySheet', 'Extensions'):
full_path = os.path.join(instance_home, dir) full_path = os.path.join(instance_home, dir)
if os.path.exists(full_path): if os.path.exists(full_path):
...@@ -44,3 +44,4 @@ elif load: ...@@ -44,3 +44,4 @@ elif load:
Storage = DemoStorage(base=FileStorage(data_fs_path)) Storage = DemoStorage(base=FileStorage(data_fs_path))
else: else:
Storage = DemoStorage() Storage = DemoStorage()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment