lazr-developers team mailing list archive
-
lazr-developers team
-
Mailing list archive
-
Message #00010
[Bug 309859] Re: ConfigSchema should provide an interface for constructing from a string
Actually, the attached branch allows you to pass a file-like object to
the ConfigSchema constructor. This will solve the problem by allowing
you to pass in a StringIO wrapper around pkg_resource.resource_string().
** Changed in: lazr.config
Importance: Undecided => Medium
Assignee: (unassigned) => Barry Warsaw (barry)
Status: New => In Progress
--
ConfigSchema should provide an interface for constructing from a string
https://bugs.launchpad.net/bugs/309859
You received this bug notification because you are a member of LAZR
Developers, which is the registrant for lazr.config.
Status in lazr.config: In Progress
Bug description:
ConfigSchema.__init__() takes a filename argument. This can cause problems if your schema file lives inside an egg. You'd like to use pkg_resource.resource_string() to get the schema as a string, but this can't be passed to ConfigSchema's constructor. Okay, you can use pkg_resource.resource_filename(), but that creates a cache file, which is kind of ugly.
ConfigSchema's constructor should accept a filename or file-like object.
References