Python Forum
hatop issue - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: hatop issue (/thread-22824.html)

Pages: 1 2 3


try and catch - deepakkr3110 - Nov-29-2019

hello

how can i add try and catch block in this python program, if the sock file exit on the server it will run and escape if sock file is not there https://github.com/JamesBarwell/haproxy-status.py/blob/master/haproxy-status.py


RE: hatop issue - buran - Nov-29-2019

There is no code using configuration file. Please, don't start new threads just to make someone to write the code for you. Implement what was advised in post # 2 of this thread

EDIT: I didn't realise it's not your repo at all. So basically you want someone to write/change code for you - using configuration file and creating desired output. This is not how the forum works.


RE: hatop issue - Malt - Dec-03-2019

I'm bit not clear about your concern. In the above scenario also, we are reading the sock using .ini file only right? Till getting all the socket files, you can use above code and the output content you can modify according to the socket details you want to print. You can parse file by file and you can decide the exact output you are looking for. Hope this answers to your question.