with open("capture_stderr.log", "w") as serviceerr:
serviceerr.write(stderr.decode("utf-8"))
+ # Error if anything was written on stderr as this may indicate ignored
+ # exceptions (e.g. ResourceWarning during garbage collection)
+ if stderr:
+ tlog("\nERROR: something was written to stderr, see "
+ "capture_stderr.log for details.")
+ success = False
+
return success