Script import_export :: Class StatusFile
[hide private]
[frames] | no frames]

Class StatusFile

Status file manager.

Instance Methods [hide private]
 
__init__(self, path)
Initializes class.
 
AddRecentOutput(self, line)
Adds a new line of recent output.
 
SetListenPort(self, port)
Sets the port the daemon is listening on.
 
GetListenPort(self)
Returns the port the daemon is listening on.
 
SetConnected(self)
Sets the connected flag.
 
GetConnected(self)
Determines whether the daemon is connected.
 
SetProgress(self, mbytes, throughput, percent, eta)
Sets how much data has been transferred so far.
 
SetExitStatus(self, exit_status, error_message)
Sets the exit status and an error message.
 
ExitStatusIsSuccess(self)
Returns whether the exit status means "success".
 
Update(self, force)
Updates the status file.
Method Details [hide private]

SetListenPort(self, port)

 

Sets the port the daemon is listening on.

Parameters:
  • port (int) - TCP/UDP port

SetProgress(self, mbytes, throughput, percent, eta)

 

Sets how much data has been transferred so far.

Parameters:
  • mbytes (number) - Transferred amount of data in MiB.
  • throughput (float) - MiB/second
  • percent (number) - Percent processed
  • eta (number) - Expected number of seconds until done

Update(self, force)

 

Updates the status file.

Parameters:
  • force (bool) - Write status file in any case, not only when minimum interval is expired