qubes: support QUBES_XML_PATH environment variable

This is reworked
    core: load default qubes.xml location from QUBES_XML_PATH env variable

QubesOS/qubes-issues#1730
This commit is contained in:
Wojtek Porczyk 2016-02-24 01:29:03 +01:00
parent e3c94f3949
commit c80e89d47e

View File

@ -1183,9 +1183,13 @@ class Qubes(PropertyHolder):
#: Information about host system
self.host = QubesHost(self)
self._store = store if store is not None else os.path.join(
qubes.config.system_path['qubes_base_dir'],
qubes.config.system_path['qubes_store_filename'])
if store is not None:
self._store = store
else:
self._store = os.environ.get('QUBES_XML_PATH',
os.path.join(
qubes.config.system_path['qubes_base_dir'],
qubes.config.system_path['qubes_store_filename']))
super(Qubes, self).__init__(xml=None, **kwargs)