nymms icon indicating copy to clipboard operation
nymms copied to clipboard

nymms/config/yaml_config tests file access poorly

Open phobologic opened this issue 12 years ago • 0 comments

This bit of code:

                        if os.path.isfile(f):
                            logger.debug("Parsing include (%s:%d): %s",
                                         filename, lineno, f)
                            c.extend(recursive_preprocess(f))
                        else:
                            logger.warning("%s is not a regular file, "
                                           "skipping (%s:%d).", f, filename,
                                           lineno)

Will give the error if, for example, it cannot access the file due to not having permissions to the directory the file is in. Need a better set of checks and error messages. try/open/except maybe?

phobologic avatar Oct 11 '13 04:10 phobologic