Also for good measure I check for tar.gz and .tgz. This'll
help avoid the problem of something else showing up in the directory
that matches the pattern scores*, like scores.tar.bz2.md5
###############################
# scores.tar.gz
- scores_filepath = glob.glob(os.path.join(c_dir_path, 'scores*'))
+ # restrict to only compressed files, so in case there are *.md5 files
+ # we don't get confused.
+ scores_filepath = []
+ for pattern in ['scores*.tar.bz2', 'scores*.tar.gz', 'scores*.tgz']:
+ scores_filepath += glob.glob(os.path.join(c_dir_path, pattern))
if len(scores_filepath) == 0:
d[c_dir]['scores'] = None