Skip to contentSkip to conversation

host.get_log() close fd

PATCH New Stefan Berger 1 participant 1 message Nov 14, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 host.get_log() close fd

Close the filedescriptor after reading the log file.

xen-unstable.hg/tools/python/xen/xend/XendAPI.py +1 -0
Index: root/xen-unstable.hg/tools/python/xen/xend/XendAPI.py
===================================================================
@@ -994,6 +994,7 @@ class XendAPI(object):
     def host_get_log(self, session, host_ref):
         log_file = open(XendLogging.getLogFilename())
         log_buffer = log_file.read()
+        log_file.close()
         return xen_api_success(log_buffer)
 
     def host_send_debug_keys(self, _, host_ref, keys):

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel