def _populate_vars(self):
        if 'variables' in self.config.keys():
            for var,question in self.config['variables'].items():
                if self.app.pargs.defaults is True:
                    try:
                        res = self.app.config.get('answers', var)
                    except ConfigParser.NoOptionError as e:
                        res = "MISSING VARIABLE"
                else:
                    if var.lower() in self.app.config.keys('answers'):
                        default = self.app.config.get('answers', var.lower())
                        res = input("%s: [%s] " % (question, default))
                        if len(res) == 0:
                            res = default
                    else:
                        res = input("%s: " % question)
                self._vars[var] = res.strip()
dataset/ETHPy150Open datafolklabs/boss/boss/cli/template.py/TemplateManager._populate_vars/original