Skip to content

Commit 95aea7b

Browse files
authored
Update gate.py
1 parent 17db169 commit 95aea7b

1 file changed

Lines changed: 17 additions & 11 deletions

File tree

gate.py

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,23 @@
9696
except Exception as ex: # pylint: disable=broad-exception-caught
9797
logger.critical("No config file found")
9898
sys.exit()
99-
mail_server = conf['mail_server']
100-
mail_l = conf['mail_l']
101-
mail_p = conf['mail_p']
102-
mail_to = conf['mail_to']
103-
got_from = conf['got_from']
104-
enc_key = conf['enc_key']
105-
enc_iv = conf['enc_iv']
106-
mktk_p = conf['mktk_p']
107-
mktk_server = conf['mktk_server']
108-
mktk_port = conf['mktk_port']
109-
mktk_u = conf['mktk_u']
99+
100+
try:
101+
mail_server = conf['mail_server']
102+
mail_l = conf['mail_l']
103+
mail_p = conf['mail_p']
104+
mail_to = conf['mail_to']
105+
got_from = conf['got_from']
106+
enc_key = conf['enc_key']
107+
enc_iv = conf['enc_iv']
108+
mktk_p = conf['mktk_p']
109+
mktk_server = conf['mktk_server']
110+
mktk_port = conf['mktk_port']
111+
mktk_u = conf['mktk_u']
112+
except Exception as ex: # pylint: disable=broad-exception-caught
113+
logger.critical("Some necessary configuration parameters not found")
114+
logger.critical("Exception is %s", str(ex))
115+
sys.exit()
110116

111117

112118
def decrypt(ciphertext, password):

0 commit comments

Comments
 (0)