File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22#
33# Contact Indoc Systems for any questions regarding the use of this source code.
44
5- import ast
65import json
76import os
87from 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 ()
You can’t perform that action at this time.
0 commit comments