User configuration

Most paths and some other settings are stored in the Config object. You should access these settings through this object.

The Config class is used to hold user wide settings.

class subuserlib.classes.config.Config(user)[source]

The config object uses loadMultiFallbackJsonConfigFile module to help it load settings:

Module used for loading multiple json config files, where attributes consequtively over-ride eachother.

subuserlib.loadMultiFallbackJsonConfigFile.expandPathInDict(homeDir, pathAttribute, dictionary)[source]

Expand the environment variables in a dictionary of setting-value pairs given that the setting holds a path.

subuserlib.loadMultiFallbackJsonConfigFile.expandPathsInDict(homeDir, pathAttributes, dictionary)[source]
subuserlib.loadMultiFallbackJsonConfigFile.filterOutNonExistantPaths(paths)[source]
subuserlib.loadMultiFallbackJsonConfigFile.getConfig(configFileHierarchy)[source]

This function is used for loading hierarchical config files in subuser. That is, loading config.json and repositories.json. For more information on config file hierarchies, see the documentation for these two files in the subuser standard:

It takes a hierarchy(a list of paths) of config files starting with the config file with the highest precidence and going to the config file with the least precidence.

It returns a dictionary of entries.