Revision 82869978
b/lib/http/server.py | ||
---|---|---|
32 | 32 |
import asyncore |
33 | 33 |
|
34 | 34 |
from ganeti import http |
35 |
from ganeti import utils |
|
35 | 36 |
|
36 | 37 |
|
37 | 38 |
WEEKDAYNAME = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] |
... | ... | |
532 | 533 |
pass |
533 | 534 |
self.socket = None |
534 | 535 |
|
536 |
# In case the handler code uses temporary files |
|
537 |
utils.ResetTempfileModule() |
|
538 |
|
|
535 | 539 |
self.request_executor(self, connection, client_addr) |
536 | 540 |
except Exception: # pylint: disable-msg=W0703 |
537 | 541 |
logging.exception("Error while handling request from %s:%s", |
b/lib/utils.py | ||
---|---|---|
2057 | 2057 |
if pid == 0: |
2058 | 2058 |
# Child process |
2059 | 2059 |
try: |
2060 |
# In case the function uses temporary files |
|
2061 |
ResetTempfileModule() |
|
2062 |
|
|
2060 | 2063 |
# Call function |
2061 | 2064 |
result = int(bool(fn())) |
2062 | 2065 |
assert result in (0, 1) |
Also available in: Unified diff