Merge pull request #7580 from ClickHouse/blinkov-patch-12

fix python issue reported by lgtm.com
This commit is contained in:
alexey-milovidov 2019-11-02 00:51:29 +03:00 committed by GitHub
commit d7e17e28f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,14 +92,14 @@ if __name__ == "__main__":
parser.add_argument('--tmp-prefix', default='/tmp', parser.add_argument('--tmp-prefix', default='/tmp',
help='Prefix to store temporay downloaded file') help='Prefix to store temporay downloaded file')
data_group = parser.add_mutually_exclusive_group(required=True) data_group = parser.add_mutually_exclusive_group(required=True)
data_group.add_argument('--table-name', table_name_argument = data_group.add_argument('--table-name',
help='Name of table with database, if you are uploading partitions') help='Name of table with database, if you are uploading partitions')
data_group.add_argument('--file-path', data_group.add_argument('--file-path',
help='Name of file, if you are uploading') help='Name of file, if you are uploading')
args = parser.parse_args() args = parser.parse_args()
if args.table_name is not None and args.clickhouse_data_path is None: if args.table_name is not None and args.clickhouse_data_path is None:
raise argparse.ArgumentError( raise argparse.ArgumentError(table_name_argument,
"You should specify --clickhouse-data-path to upload --table") "You should specify --clickhouse-data-path to upload --table")
s3_conn = S3API( s3_conn = S3API(