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.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, path)
(Constructor)

 

Initializes class.

Overrides: object.__init__

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