X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FKERNEL_PY%2Fkernel%2Fsyshelper.py;h=dd7c9f8e2ad5577fb5762807e4d987891e1b76f2;hb=9a965a48d4bc1a6cd1f73229a91e77b10bffa881;hp=eb83e7966b546e81f7f8951fdb41422c2e07abde;hpb=0fac7040be417aab7228a4e23904b4cf22a8dda4;p=modules%2Fkernel.git diff --git a/src/KERNEL_PY/kernel/syshelper.py b/src/KERNEL_PY/kernel/syshelper.py index eb83e7966..dd7c9f8e2 100644 --- a/src/KERNEL_PY/kernel/syshelper.py +++ b/src/KERNEL_PY/kernel/syshelper.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2015 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 @@ -25,7 +25,7 @@ __author__="gboulant" __date__ ="$21 mai 2010 18:00:23$" -def findFiles(rootpath, excludes=[]): +def findFiles(rootpath, excludes=None): """ This looks after files recursively from the specified rootpath, but without visiting directories whose basename is in the list @@ -34,6 +34,8 @@ def findFiles(rootpath, excludes=[]): if not os.path.exists(rootpath): raise RuntimeError("the path %s does not exists"%rootpath) + if excludes is None: + excludes = [] exclude_options="" for excludepath in excludes: exclude_options+="-e %s "%excludepath