X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FdaComposant%2FdaCore%2FInterfaces.py;h=34508cb233aeb851fdde8bf1b0f0558c4689b4ea;hb=069f0f7fe7697e40e3535257789ee3168210748f;hp=7d860be41ead576d91869c8adf3faac650fd9d07;hpb=f6a434c133c5958c16d163992499250cc216eaa0;p=modules%2Fadao.git diff --git a/src/daComposant/daCore/Interfaces.py b/src/daComposant/daCore/Interfaces.py index 7d860be..34508cb 100644 --- a/src/daComposant/daCore/Interfaces.py +++ b/src/daComposant/daCore/Interfaces.py @@ -764,12 +764,9 @@ class ImportDetector(object): else: return False def is_not_local_file(self): - if not os.path.isfile(os.path.realpath(self.__url)): - return True - else: - return False + return not self.is_local_file() def raise_error_if_not_local_file(self): - if not os.path.isfile(os.path.realpath(self.__url)): + if self.is_not_local_file(): raise ValueError("The name or the url of the file object doesn't seem to exist. The given name is:\n \"%s\""%str(self.__url)) else: return False @@ -782,12 +779,9 @@ class ImportDetector(object): else: return False def is_not_local_dir(self): - if not os.path.isdir(self.__url): - return True - else: - return False + return not self.is_local_dir() def raise_error_if_not_local_dir(self): - if not os.path.isdir(self.__url): + if self.is_not_local_dir(): raise ValueError("The name or the url of the directory object doesn't seem to exist. The given name is:\n \"%s\""%str(self.__url)) else: return False