From 8e792b9b8ff0a324eafab5d9ba77a49ceddaee9f Mon Sep 17 00:00:00 2001 From: xtaodada Date: Sat, 8 Aug 2020 21:28:59 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=90=20=E9=98=B2=E6=AD=A2=E6=97=A0?= =?UTF-8?q?=E8=84=91=E6=9B=B4=E6=96=B0=E6=97=A0=E6=B3=95=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagermaid/__init__.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pagermaid/__init__.py b/pagermaid/__init__.py index 085e568..3487c64 100644 --- a/pagermaid/__init__.py +++ b/pagermaid/__init__.py @@ -61,11 +61,18 @@ if not exists(f"{getcwd()}/data"): api_key = config['api_key'] api_hash = config['api_hash'] -proxy_addr = config['proxy_addr'].strip() -proxy_port = config['proxy_port'].strip() -mtp_addr = config['mtp_addr'].strip() -mtp_port = config['mtp_port'].strip() -mtp_secret = config['mtp_secret'].strip() +try: + proxy_addr = config['proxy_addr'].strip() + proxy_port = config['proxy_port'].strip() + mtp_addr = config['mtp_addr'].strip() + mtp_port = config['mtp_port'].strip() + mtp_secret = config['mtp_secret'].strip() +except: + proxy_addr = '' + proxy_port = '' + mtp_addr = '' + mtp_port = '' + mtp_secret = '' try: redis_host = config['redis']['host'] except KeyError: