In order to mitigate against the brute force attacks against Gitlab accounts, we are moving to all edu-ID Logins. We would like to remind you to link your account with your edu-id. Login will be possible only by edu-ID after November 30, 2021. Here you can find the instructions for linking your account.

If you don't have a SWITCH edu-ID, you can create one with this guide here

kind regards

Commit ef155f59 authored by Matthias's avatar Matthias
Browse files

distinguish config-directory depending on environment

parent 76da8caf
Pipeline #27993 passed with stages
in 2 minutes and 3 seconds
......@@ -63,7 +63,14 @@ class FetchMappingFile(Resource):
sftp_client = ssh_client.open_sftp()
for fileName in ['mapping.yml', 'transform.xslt', 'localTransforms.yml']:
remote_path = '/swissbib_index/mb_sftp/' + recordset_id + '/config/' + fileName
configDirectory = 'config'
if current_app.config['env'] == 'stage':
configDirectory = 'config-stage'
elif current_app.config['env'] == 'test':
configDirectory = 'config-test'
remote_path = '/swissbib_index/mb_sftp/' + recordset_id +\
'/' + configDirectory + '/' + fileName
try:
sftp_client.stat(remote_path)
remote_file = sftp_client.file(remote_path, 'r')
......
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