From 56c8eae73868f4cb057a6d56e49a5a16b9cee291 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Fri, 8 Jan 2010 14:18:08 +0000 Subject: [PATCH] uploading bmlog - fits new pycurl --- source/BootManager.py | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/source/BootManager.py b/source/BootManager.py index 714aa15..cdd2cfa 100755 --- a/source/BootManager.py +++ b/source/BootManager.py @@ -124,11 +124,24 @@ class log: hostname= self.VARS['INTERFACE_SETTINGS']['hostname'] + "." + \ self.VARS['INTERFACE_SETTINGS']['domainname'] bs_request = BootServerRequest.BootServerRequest(self.VARS) - bs_request.MakeRequest(PartialPath = self.VARS['UPLOAD_LOG_SCRIPT'], - GetVars = None, PostVars = None, - FormData = ["log=@" + self.OutputFilePath, - "hostname=" + hostname, "type=bm.log"], - DoSSL = True, DoCertCheck = True) + try: + # this was working until f10 + bs_request.MakeRequest(PartialPath = self.VARS['UPLOAD_LOG_SCRIPT'], + GetVars = None, PostVars = None, + DoSSL = True, DoCertCheck = True, + FormData = ["log=@" + self.OutputFilePath, + "hostname=" + hostname, + "type=bm.log"]) + except: + # new pycurl + import pycurl + bs_request.MakeRequest(PartialPath = self.VARS['UPLOAD_LOG_SCRIPT'], + GetVars = None, PostVars = None, + DoSSL = True, DoCertCheck = True, + FormData = [('log',(pycurl.FORM_FILE, self.OutputFilePath)), + ("hostname",hostname), + ("type","bm.log")]) + ############################## class BootManager: -- 2.43.0