dotstat_io 1.0.1__py3-none-any.whl → 1.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dotstat_io might be problematic. Click here for more details.
dotstat_io/client.py
CHANGED
|
@@ -97,10 +97,15 @@ class Client():
|
|
|
97
97
|
self.__log.info(' ' + line)
|
|
98
98
|
else:
|
|
99
99
|
if response.status_code != 200:
|
|
100
|
-
returned_result = self.__ERROR_OCCURRED
|
|
101
|
-
|
|
100
|
+
returned_result = self.__ERROR_OCCURRED
|
|
101
|
+
if len(str(response.status_code)) > 0:
|
|
102
|
+
returned_result += 'Error code: ' + str(response.status_code) + os.linesep
|
|
103
|
+
if len(str(response.reason)) > 0:
|
|
104
|
+
returned_result += 'Reason: ' + str(response.reason) + os.linesep
|
|
102
105
|
if len(response.text) > 0:
|
|
103
|
-
returned_result +=
|
|
106
|
+
returned_result += 'Text: ' + response.text
|
|
107
|
+
|
|
108
|
+
returned_result += os.linesep
|
|
104
109
|
else:
|
|
105
110
|
if os.path.isfile(file_path):
|
|
106
111
|
os.remove(file_path)
|
|
@@ -237,27 +242,31 @@ class Client():
|
|
|
237
242
|
|
|
238
243
|
returned_result = returned_result + result + os.linesep
|
|
239
244
|
else:
|
|
240
|
-
returned_result = self.__ERROR_OCCURRED
|
|
245
|
+
returned_result = self.__ERROR_OCCURRED
|
|
246
|
+
if len(str(response.status_code)) > 0:
|
|
247
|
+
returned_result += 'Error code: ' + str(response.status_code) + os.linesep
|
|
241
248
|
if len(str(response.reason)) > 0:
|
|
242
249
|
returned_result += 'Reason: ' + str(response.reason) + os.linesep
|
|
243
250
|
if len(response.text) > 0:
|
|
244
|
-
returned_result
|
|
251
|
+
returned_result += 'Text: ' + response.text
|
|
245
252
|
|
|
246
|
-
returned_result
|
|
253
|
+
returned_result += os.linesep
|
|
247
254
|
# Write the result to the log
|
|
248
255
|
for line in returned_result.split(os.linesep):
|
|
249
256
|
if len(line) > 0:
|
|
250
257
|
self.__log.info(' ' + line)
|
|
251
258
|
except ValueError as err:
|
|
252
|
-
returned_result = self.__ERROR_OCCURRED
|
|
259
|
+
returned_result = self.__ERROR_OCCURRED
|
|
253
260
|
if len(str(response.status_code)) > 0:
|
|
254
261
|
returned_result += 'Error code: ' + str(response.status_code) + os.linesep
|
|
255
262
|
if len(str(response.reason)) > 0:
|
|
256
263
|
returned_result += 'Reason: ' + str(response.reason) + os.linesep
|
|
257
264
|
if len(response.text) > 0:
|
|
258
|
-
returned_result += str(response.text)
|
|
265
|
+
returned_result += 'Text: ' + str(response.text)
|
|
259
266
|
else:
|
|
260
267
|
returned_result += str(err)
|
|
268
|
+
|
|
269
|
+
returned_result += os.linesep
|
|
261
270
|
finally:
|
|
262
271
|
return returned_result
|
|
263
272
|
|
|
@@ -383,20 +392,27 @@ class Client():
|
|
|
383
392
|
returned_result = returned_result + 'Log' + str(index) + ': ' + results_json['logs'][index]['message'] + os.linesep
|
|
384
393
|
index += 1
|
|
385
394
|
else:
|
|
386
|
-
returned_result = self.__ERROR_OCCURRED
|
|
387
|
-
|
|
395
|
+
returned_result = self.__ERROR_OCCURRED
|
|
396
|
+
if len(str(response.status_code)) > 0:
|
|
397
|
+
returned_result += 'Error code: ' + str(response.status_code) + os.linesep
|
|
398
|
+
if len(str(response.reason)) > 0:
|
|
399
|
+
returned_result += 'Reason: ' + str(response.reason) + os.linesep
|
|
388
400
|
if len(response.text) > 0:
|
|
389
|
-
returned_result
|
|
401
|
+
returned_result += 'Text: ' + str(response.text)
|
|
402
|
+
|
|
403
|
+
returned_result += os.linesep
|
|
390
404
|
except ValueError as err:
|
|
391
|
-
returned_result = self.__ERROR_OCCURRED
|
|
405
|
+
returned_result = self.__ERROR_OCCURRED
|
|
392
406
|
if len(str(response.status_code)) > 0:
|
|
393
407
|
returned_result += 'Error code: ' + str(response.status_code) + os.linesep
|
|
394
408
|
if len(str(response.reason)) > 0:
|
|
395
409
|
returned_result += 'Reason: ' + str(response.reason) + os.linesep
|
|
396
410
|
if len(response.text) > 0:
|
|
397
|
-
returned_result += str(response.text)
|
|
411
|
+
returned_result += 'Text: ' + str(response.text)
|
|
398
412
|
else:
|
|
399
413
|
returned_result += str(err)
|
|
414
|
+
|
|
415
|
+
returned_result += os.linesep
|
|
400
416
|
finally:
|
|
401
417
|
return returned_result
|
|
402
418
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
dotstat_io/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
dotstat_io/authentication.py,sha256=6mxRXuDUgU7wBrUNMzoXU_PFCF1bLGAiGgVrwOePmZw,14057
|
|
3
|
+
dotstat_io/client.py,sha256=eAWU_A0pJ8Vl4H9ky_-GgfcaeWyJnU3L2-4Jryd9NR8,17222
|
|
4
|
+
dotstat_io-1.0.2.dist-info/METADATA,sha256=HADdFyO--WTetZF1jWdC4kdSDV_jloTLIceGf0YKrVo,7280
|
|
5
|
+
dotstat_io-1.0.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
6
|
+
dotstat_io-1.0.2.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
dotstat_io/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
dotstat_io/authentication.py,sha256=6mxRXuDUgU7wBrUNMzoXU_PFCF1bLGAiGgVrwOePmZw,14057
|
|
3
|
-
dotstat_io/client.py,sha256=_GuDXvOGpg8WxW6Qw5yvTbMRN70nRIaWUojS7FSJ2WA,16630
|
|
4
|
-
dotstat_io-1.0.1.dist-info/METADATA,sha256=Llnfc4eItd4ivCc65plilOihe-2sj4xJfWnzBYTtqXQ,7280
|
|
5
|
-
dotstat_io-1.0.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
6
|
-
dotstat_io-1.0.1.dist-info/RECORD,,
|
|
File without changes
|