On Saturday, October 7, 2017 at 12:38:11 PM UTC-4, Prabu T.S. wrote: > I would like to continue to second function invocation > "checkServiceStatus('AdobeARMservice')" even if the first > checkServiceStatus('Tomcat9') has any exception.Please advice.Second > function invocation not getting executed if any exception occurs in > first.Please advice. > > > import psutil > > def checkServiceStatus(server): > status = None > try: > service = psutil.win_service_get(server) > status = service.as_dict() > print("%s (%s)" % (status['name'], status['display_name'])) > print("status: %s, start: %s, username: %s, pid: %s" % ( > status['status'], status['start_type'], status['username'], > status['pid'])) > print("binpath: %s" % status['binpath']) > print(" ") > except Exception: > pass > return status > > checkServiceStatus('Tomcat9') > checkServiceStatus('AdobeARMservice')
ignore this for now. -- https://mail.python.org/mailman/listinfo/python-list