def load(self):
try:<EOL><INDENT>with open(self.config_file) as configfile:<EOL><INDENT>self.config = yaml.load(configfile)<EOL><DEDENT><DEDENT>except TypeError:<EOL><INDENT>pass<EOL><DEDENT>if self.config:<EOL><INDENT>self.prefix = self.config.get('<STR_LIT>', None)<EOL><DEDENT>if not self.prefix:<EOL><INDENT>if os.getenv(self.config_prefix):<EOL><INDENT>self.prefix = os.getenv(self.config_prefix)<EOL><DEDENT>else:<EOL><INDENT>for path in [<EOL>os.path.join(self.basepath, self.default_file),<EOL>os.path.join(self.config_root, self.default_file)<EOL>]:<EOL><INDENT>if os.path.exists(path):<EOL><INDENT>with open(path) as conf:<EOL><INDENT>config = yaml.load(conf)<EOL>prefix = config.get(<EOL>self.config_prefix.lower(), None<EOL>)<EOL>if prefix:<EOL><INDENT>self.prefix = prefix<EOL>break<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>
(Re)Load config file.