Skip to content

Commit 84d1be3

Browse files
author
mfsoftworks
committed
[script] added exit on server connection error
1 parent 1212cc7 commit 84d1be3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.coverage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
!coverage.py: This is a private format, don't read it directly!{"lines":{"D:\\Projects\\Server-Monitoring-Script\\monitor.py":[1,3,77,102,114,5,6,9,10,11,12,15,16,17,18,19,20,23,24,25,26,28,29,30,31,32,33,36,38,41,42,79,80,82,85,86,89,92,94,97,99,100,43,46,48,49,51,54,58,59,60,61,62,63,64,65,66,67,68,71,72,73,75,103,104,105,106,107,108,109,115,116]}}
1+
!coverage.py: This is a private format, don't read it directly!{"lines":{"D:\\Projects\\Server-Monitoring-Script\\monitor.py":[1,3,77,102,114,115,5,6,9,10,11,12,15,16,17,18,19,20,23,24,25,26,28,29,30,31,32,33,36,38,41,42,79,80,82,85,86,89,92,94,97,99,100,43,46,48,49,51,54,58,59,60,61,62,63,64,65,66,67,68,71,72,73,75,103,104,105,110,111,112]}}

monitor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ def post_data(data):
109109
print("Content:\n", response.json())
110110
except requests.exceptions.RequestException as e:
111111
print("\nGET Error:\n",e)
112+
exit(0)
112113

113114
while True:
114115
main()

0 commit comments

Comments
 (0)