Summary: | java-config-2 query method for Virtual package behaves weirdly for foobar values | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Petteri Räty (RETIRED) <betelgeuse> |
Component: | [OLD] Java | Assignee: | Java team <java> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | InVCS |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 177429 |
InSVN, or at least will be when I commit :)
from java_config_2.EnvironmentManager import EnvironmentManager as em
>>> em.get_package("javadoc").query("FOO")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/alistair/gentoo/overlays/projects/java-config-2/trunk/src/java_config_2/Virtual.py", line 143, in query
return self.get_provider().query(var)
File "java_config_2/VM.py", line 39, in query
raise EnvironmentUndefinedError
java_config_2.Errors.EnvironmentUndefinedError
Fixed, released and stabilised ages ago. |
>>> from java_config_2.EnvironmentManager import EnvironmentManager as em >>> em.get_package("javadoc").query("FOO") Undefined: FOO 'sun-jdk-1.4 sun-jdk-1.5 sun-jdk-1.6' Rather than catching the error from the VM and returning the VM property I think we should change the method to throw an error when the key in question is not defined.