Salome HOME
projects
/
modules
/
kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bos #24412 Add missing failback for UpdateView() method
[modules/kernel.git]
/
src
/
KERNEL_PY
/
kernel
/
syshelper.py
diff --git
a/src/KERNEL_PY/kernel/syshelper.py
b/src/KERNEL_PY/kernel/syshelper.py
index f3c94600df0d86459942b9a2b51d59e858d45e8b..9e2faa374594156a2677c96e571b0a9958a96aa5 100644
(file)
--- a/
src/KERNEL_PY/kernel/syshelper.py
+++ b/
src/KERNEL_PY/kernel/syshelper.py
@@
-1,5
+1,5
@@
# -*- coding: iso-8859-1 -*-
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-20
16
CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-20
21
CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-58,7
+58,7
@@
def walktree(rootpath, callback, **kwargs):
pathname = os.path.join(rootpath, f)
try:
mode = os.stat(pathname)[ST_MODE]
pathname = os.path.join(rootpath, f)
try:
mode = os.stat(pathname)[ST_MODE]
- except OSError
,
e:
+ except OSError
as
e:
# It probably means that the file is a broken inode
mode = -1
if S_ISDIR(mode):
# It probably means that the file is a broken inode
mode = -1
if S_ISDIR(mode):
@@
-69,7
+69,7
@@
def walktree(rootpath, callback, **kwargs):
callback(pathname, **kwargs)
else:
# Unknown file type, print a message
callback(pathname, **kwargs)
else:
# Unknown file type, print a message
- print
'Skipping %s' % pathname
+ print
('Skipping %s' % pathname)
#
#
@@
-84,26
+84,26
@@
except KeyError:
TESTDOCDIR="/tmp"
def TEST_findFiles():
TESTDOCDIR="/tmp"
def TEST_findFiles():
- print
"########## find 1"
+ print
("########## find 1")
rootpath=TESTDOCDIR
listfiles=findFiles(rootpath)
for filename in listfiles:
rootpath=TESTDOCDIR
listfiles=findFiles(rootpath)
for filename in listfiles:
- print
filename
+ print
(filename)
- print
"########## find 2"
+ print
("########## find 2")
excludes=[os.path.join(TESTDOCDIR,"doc")]
listfiles=findFiles(rootpath,excludes)
for filename in listfiles:
excludes=[os.path.join(TESTDOCDIR,"doc")]
listfiles=findFiles(rootpath,excludes)
for filename in listfiles:
- print
filename
+ print
(filename)
return True
# This is the test callback function
def visitfile_withargs(file, rootid):
return True
# This is the test callback function
def visitfile_withargs(file, rootid):
- print
'visiting file %s (rootid=%s)'%(file,str(rootid
))
+ print
('visiting file %s (rootid=%s)'%(file,str(rootid)
))
def visitfile_withoutargs(file):
def visitfile_withoutargs(file):
- print
'visiting file %s'%(file
)
+ print
('visiting file %s'%(file)
)
def TEST_walktree():
#walktree(TESTDOCDIR, visitfile_withargs, rootid=2)
def TEST_walktree():
#walktree(TESTDOCDIR, visitfile_withargs, rootid=2)
@@
-111,6
+111,6
@@
def TEST_walktree():
return True
if __name__ == "__main__":
return True
if __name__ == "__main__":
- import unittester
+
from .
import unittester
unittester.run("syshelper", "TEST_findFiles")
unittester.run("syshelper", "TEST_walktree")
unittester.run("syshelper", "TEST_findFiles")
unittester.run("syshelper", "TEST_walktree")