Dammit, the problem was from totally different department!
The actual error was caused by the Simple HTTP Server trying to output its log where there was no place where to output, as the script was launched by system at startup.
I have silenced the console logging by implementing log_message method in my HTTP handler. Tada! Everything works now.
class MyHandler(BaseHTTPServer.BaseHTTPRequestHandler):
def log_message(self, format, *args):
return
A somewhat brutal way to silence logging, so I'll replace it by logging to file, though.