Poodletooth-iLand/panda/direct/p3d/InstalledHostData.py
Master Jumblespeed d882959bfa switch to remote
2015-05-18 22:11:33 -04:00

22 lines
819 B
Python
Executable file

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'