error

Well, assuming that the rest of the code is correct, I guess you have some troubles with indentation… If you use four spaces as one indentation level, then this must work (I guess):

    def setKey(self, key, value):
        self.keyMap[key] = value