I'm trying to implement a shop in my game, right now I can buy anything in the shop and it works perfectly, but I can't sell anything because I get an error I can't figure out.

Here's the relevent code:

Code:
    def shop(self, name):
        self.name = name
        if name == "sapphire":
            if "sapphire" in self.inventory:
                print "I can buy that
...