Skip to content

Commit 195dfa3

Browse files
committed
pick out the -s updates
1 parent 242583f commit 195dfa3

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

app/commands/file.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#
33
# Contact Indoc Systems for any questions regarding the use of this source code.
44

5-
import ast
65
import json
76
import os
87
from sys import exit
@@ -84,7 +83,8 @@ def cli():
8483
default=None,
8584
required=False,
8685
help=file_help.file_help_page(file_help.FileHELP.FILE_UPLOAD_S),
87-
type=click.File('rb'),
86+
# type=click.File('rb'),
87+
type=str,
8888
show_default=True,
8989
)
9090
@click.option(
@@ -146,10 +146,11 @@ def file_put(**kwargs): # noqa: C901
146146
attribute = json.load(attribute_file) if attribute_file else None
147147
except Exception:
148148
SrvErrorHandler.customized_handle(ECustomizedError.INVALID_TEMPLATE, True)
149-
try:
150-
source_files = ast.literal_eval(source_file.read().decode('utf-8')) if source_file else None
151-
except Exception:
152-
SrvErrorHandler.customized_handle(ECustomizedError.INVALID_SOURCE_FILE, True)
149+
# try:
150+
# source_files = ast.literal_eval(source_file.read().decode('utf-8')) if source_file else None
151+
# except Exception:
152+
# SrvErrorHandler.customized_handle(ECustomizedError.INVALID_SOURCE_FILE, True)
153+
source_files = [source_file] if source_file else None
153154

154155
# Check zone and upload-message
155156
zone = get_zone(zone) if zone else AppConfig.Env.green_zone.lower()

0 commit comments

Comments
 (0)