Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthias
my-test-project-1
Commits
86732927
Commit
86732927
authored
Jun 15, 2021
by
Matthias
Browse files
adapt to sftp-structure
parent
ef155f59
Pipeline
#32999
passed with stages
in 2 minutes and 9 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
import_api_app/resources/FetchMappingFile.py
View file @
86732927
...
...
@@ -63,14 +63,14 @@ class FetchMappingFile(Resource):
sftp_client
=
ssh_client
.
open_sftp
()
for
fileName
in
[
'mapping.yml'
,
'transform.xslt'
,
'localTransforms.yml'
]:
configDirectory
=
'config
'
envDir
=
'/
'
if
current_app
.
config
[
'env'
]
==
'stage'
:
configDirectory
=
'config-
stage'
envDir
=
'/
stage
/
'
elif
current_app
.
config
[
'env'
]
==
'test'
:
configDirectory
=
'config-
test'
envDir
=
'/
test
/
'
remote_path
=
'/swissbib_index/mb_sftp
/
'
+
recordset_id
+
\
'/
'
+
config
Directory
+
'
/'
+
fileName
remote_path
=
'/swissbib_index/mb_sftp'
+
envDir
+
recordset_id
+
\
'/config/'
+
fileName
try
:
sftp_client
.
stat
(
remote_path
)
remote_file
=
sftp_client
.
file
(
remote_path
,
'r'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment