From 2bba5332d871d7bd109189562b4be26168429480 Mon Sep 17 00:00:00 2001 From: Mike Hiretsky Date: Thu, 5 Aug 2010 17:54:28 +0000 Subject: [PATCH] Fix selecting best distributive. Fix change filesystem. --- pym/cl_distr.py | 4 +++- pym/cl_install.py | 9 ++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/pym/cl_distr.py b/pym/cl_distr.py index b3046f9..5c9b091 100644 --- a/pym/cl_distr.py +++ b/pym/cl_distr.py @@ -130,7 +130,9 @@ class DistributiveRepository: if pathexists(pathjoin(path,'etc/calculate')): return [path] else: - return os.listdir(path) + # discard inner directories + return filter(lambda x:not os.path.isdir(pathjoin(path,x)), + os.listdir(path)) # get lists files in directories allFiles = map(lambda x: map(lambda y: pathjoin(x,y), listdistr(x)), diff --git a/pym/cl_install.py b/pym/cl_install.py index 755de94..81b484e 100644 --- a/pym/cl_install.py +++ b/pym/cl_install.py @@ -522,9 +522,12 @@ class convertDictOpt: dictUpdateProperty["mountPoint"] = optMountPoint supportedFS = self.getAllSupportFileSystemOpt() # if fs not specified and current fs not supported - if not optFileSystem and \ - not (format and format in supportedFS): - optFileSystem = "default" + if not optFileSystem: + if not (format and format in supportedFS): + optFileSystem = "default" + else: + dictUpdateProperty["fileSystem"] = format + # if specified fs if optFileSystem: # if specified wrong fs