# see also InstallBootstrapFS in bootmanager that does similar things
def get_nodefamily (self, node):
try:
- (pldistro,arch) = file("/etc/planetlab/nodefamily").read().split("-")
+ (pldistro,arch) = file("/etc/planetlab/nodefamily").read().strip().split("-")
except:
(pldistro,arch) = ("planetlab","i386")
def bootcd_version (self):
try:
- f = open (self.BOOTCDDIR + "/build/version.txt")
- version=f.readline().strip()
- finally:
- f.close()
- return version
+ return file(self.BOOTCDDIR + "/build/version.txt").readline().strip()
+ except:
+ raise Exception,"Unknown boot cd version - probably wrong bootcd dir : %s"%self.BOOTCDDIR
def cleantrash (self):
for file in self.trash: