- XXX back out 1.5 temporarily for a tag
[bootmanager.git] / source / BootManager.py
index 478c714..fdda2a3 100755 (executable)
@@ -86,9 +86,6 @@ class log:
                 print( "Unable to open output file for log, continuing" )
                 self.OutputFile= None
 
-        # for upload
-        os.system( "ifconfig eth0 > /tmp/ifconfig" )
-
     
     def LogEntry( self, str, inc_newline= 1, display_screen= 1 ):
         if self.OutputFile:
@@ -120,16 +117,17 @@ class log:
         """
         upload the contents of the log to the server
         """
-    
-        self.LogEntry( "Uploading logs to %s" % UPLOAD_LOG_URL )
-        
-        self.OutputFile.close()
-        self.OutputFile= None
-                
-        curl_cmd= "%s -s --connect-timeout 60 --max-time 600 " \
-                  "--form log=@%s --form ifconfig=\</tmp/ifconfig %s" % \
-                  (CURL_PATH, self.OutputFilePath, UPLOAD_LOG_URL)
-        os.system( curl_cmd )
+
+        if self.OutputFile is not None:
+            self.LogEntry( "Uploading logs to %s" % UPLOAD_LOG_URL )
+            
+            self.OutputFile.close()
+            self.OutputFile= None
+            
+            curl_cmd= "%s -s --connect-timeout 60 --max-time 600 " \
+                      "--form log=@%s %s" % \
+                      (CURL_PATH, self.OutputFilePath, UPLOAD_LOG_URL)
+            os.system( curl_cmd )