mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-09-19 12:14:49 -04:00
simplify checking for *.js
This commit is contained in:
parent
a30b5d8dd2
commit
5a7a24083f
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ import logging
|
|||
|
||||
logger = logging.getLogger('behaviors')
|
||||
behaviors_directory = os.path.sep.join(__file__.split(os.path.sep)[:-1] + ['behaviors.d'])
|
||||
behavior_files = chain(*[[os.path.join(dir, file) for file in files if re.match('^[^.].*\.js$', file)] for dir, dirs, files in os.walk(behaviors_directory)])
|
||||
behavior_files = chain(*[[os.path.join(dir, file) for file in files if file.endswith('.js')] for dir, dirs, files in os.walk(behaviors_directory)])
|
||||
behaviors = []
|
||||
for file_name in behavior_files:
|
||||
logger.debug("reading behavior file {}".format(file_name))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue