mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-25 20:52:26 -06:00
22 lines
819 B
Python
22 lines
819 B
Python
from pandac.PandaModules import URLSpec
|
|
|
|
class InstalledHostData:
|
|
""" A list of instances of this class is returned by
|
|
AppRunner.scanInstalledPackages(). Each of these corresponds to a
|
|
particular host that has provided packages that have been
|
|
installed on the local client. """
|
|
|
|
def __init__(self, host, dirnode):
|
|
self.host = host
|
|
self.pathname = dirnode.pathname
|
|
self.totalSize = dirnode.getTotalSize()
|
|
self.packages = []
|
|
|
|
if self.host:
|
|
self.hostUrl = self.host.hostUrl
|
|
self.descriptiveName = self.host.descriptiveName
|
|
if not self.descriptiveName:
|
|
self.descriptiveName = URLSpec(self.hostUrl).getServer()
|
|
else:
|
|
self.hostUrl = 'unknown'
|
|
self.descriptiveName = 'unknown'
|