Feb-10-2022, 02:21 PM
How can i use try except in this code script?
I want to print an error message when the connection refused.
Sorry for this simple question but im a newbie :(
I want to print an error message when the connection refused.
Sorry for this simple question but im a newbie :(
#!/usr/bin/python3 #!/usr/bin/python import wmi_client_wrapper as wmi wmic = wmi.WmiClientWrapper(username="Administrator",password="Ares4382)",host="192.168.1.200",) output = wmic.query("SELECT * FROM Win32_Processor")