comparison run_tests.py @ 4026:c8b0a23ba38d

Fix issue2550493: hide 'hidden' files.
author Stefan Seefeld <stefan@seefeld.name>
date Mon, 09 Feb 2009 17:47:12 +0000
parents 1343ae27dde9
children 25a6f93a17e1
comparison
equal deleted inserted replaced
4020:4a195c5759fe 4026:c8b0a23ba38d
446 446
447 This could theoreticaly result in an infinite loop, if you create symlink 447 This could theoreticaly result in an infinite loop, if you create symlink
448 cycles in your Zope sandbox, so don't do that. 448 cycles in your Zope sandbox, so don't do that.
449 """ 449 """
450 try: 450 try:
451 names = os.listdir(top) 451 # Prevent 'hidden' files (those starting with '.') from being considered.
452 names = [f for f in os.listdir(top) if not f.startswith('.')]
452 except os.error: 453 except os.error:
453 return 454 return
454 func(arg, top, names) 455 func(arg, top, names)
455 exceptions = ('.', '..') 456 exceptions = ('.', '..')
456 for name in names: 457 for name in names:

Roundup Issue Tracker: http://roundup-tracker.org/