Skip to content

Commit b8fa9f4

Browse files
committed
补充更多exit
1 parent e143f0a commit b8fa9f4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ddns.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
print(
66
'''ddns-py-huawei 启动!
77
一款用于华为云的 DDNS 工具。
8-
版本:1.0.4
8+
版本:1.0.5
99
作者:bddjr
1010
仓库:https://github.com/bddjr/ddns-py-huawei
1111
=============================================='''
@@ -80,7 +80,7 @@ def pip_install(name: str):
8080
except:
8181
pip_install('huaweicloudsdkdns')
8282
from huaweicloudsdkdns.v2.region.dns_region import DnsRegion
83-
from huaweicloudsdkdns.v2 import *
83+
from huaweicloudsdkdns.v2 import * # type: ignore
8484

8585
del pip_install
8686

@@ -383,7 +383,8 @@ def set_record():
383383

384384
if mode == 1:
385385
get_ip()
386-
set_record()
386+
if not set_record():
387+
exit(1)
387388
elif mode == 2:
388389
get_ip()
389390
update_dns_success = set_record()
@@ -434,3 +435,4 @@ def set_record():
434435

435436
except KeyboardInterrupt:
436437
print('\nCtrl+C')
438+
exit(1)

0 commit comments

Comments
 (0)