From b411f1f7e671df22e0415e09d98679537630bfd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 22 Jun 2021 10:41:02 +0200 Subject: [PATCH] grand lyon: copy to current tenant --- grandlyon/scripts/copy-wcs.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/grandlyon/scripts/copy-wcs.py b/grandlyon/scripts/copy-wcs.py index 24a5831..e80b5b1 100755 --- a/grandlyon/scripts/copy-wcs.py +++ b/grandlyon/scripts/copy-wcs.py @@ -45,13 +45,7 @@ for object_type in ('carddefs', 'formdefs', 'workflows', 'categories', 'datasour else: print('missing source tenant') sys.exit(1) - if os.path.exists('/var/lib/wcs/%s' % dest_site): - dest_base_dir = '/var/lib/wcs/%s' % dest_site - elif os.path.exists('/var/lib/wcs/tenants/%s' % dest_site): - dest_base_dir = '/var/lib/wcs/tenants/%s' % dest_site - else: - print('missing destination tenant') - sys.exit(1) + dest_base_dir = get_publisher().app_dir orig_dir = os.path.join('%s/%s/' % (orig_base_dir, object_type)) dest_dir = os.path.join('%s/%s/' % (dest_base_dir, object_type)) if not os.path.exists(orig_dir):