def do_set(self, arg):
        if not arg:
            keys = self._config.keys()
            keys.sort()
            for key in keys:
                print "%s: %s" % (key, self._config[key])
        else:
            args = arg.split(None, 1)
            if len(args) == 1:
                key = args[0]
                if key in self._config:
                    print "Removing %s: %s" % (key, self._config[key])
                    del self._config[key]
                else:
                    print "%s: Not set" % (key)
            else:
                key, value = args
                if(hasattr(self, '_set_' + key)):
                    fn = getattr(self, '_set_' + key)
                    fn(value)
                else:
                    print "No such config value"
dataset/ETHPy150Open sassoftware/conary/conary/lib/epdb_embedded/__init__.py/Epdb.do_set/original