Salome HOME
projects
/
modules
/
adao.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Code improvements, review and simplifications (2)
[modules/adao.git]
/
src
/
daComposant
/
daCore
/
Interfaces.py
diff --git
a/src/daComposant/daCore/Interfaces.py
b/src/daComposant/daCore/Interfaces.py
index 7d860be41ead576d91869c8adf3faac650fd9d07..34508cb233aeb851fdde8bf1b0f0558c4689b4ea 100644
(file)
--- 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):
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):
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
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):
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):
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
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