def addYamlBlocksFromFile(self, filename):
        try:
            import pkg_resources

            f = pkg_resources.resource_stream(__name__, filename)
        except (ImportError, IOError), e:
            print "Cannot get resource_stream for ", filename, e
            root = os.environ.get("PYMCLEVEL_YAML_ROOT", "pymclevel")  # fall back to cwd as last resort
            path = join(root, filename)

            log.exception((filename, path) % "Failed to read %s using pkg_resources. Trying %s instead.")

            f = file(path)
        try:
            log.info(u"Loading block info from %s", f)
            blockyaml = yaml.load(f)
            self.addYamlBlocks(blockyaml)

        except Exception, e:
            log.error(u"Exception while loading block info from %s: %s", f, e)
            raise
dataset/ETHPy150Open mcedit/pymclevel/materials.py/MCMaterials.addYamlBlocksFromFile/swapped operands of `%`