i am not able to figure out why python throws an error when i call this function.
In the code snippet below when i call set_greyLevel() python throws an error.
If i comment the function call it works fine.

Please help. Thanks in advance.

def set_greyLevel(self, grayScale):
        if grayScale == 0:
            return "#cecece"
        elif grayScale == 1:
            return "#a0a0a0"
        elif grayScale == 2:
            return "#787878"
        elif grayScale == 3:
            return "#505050"
        else:
            return  "#000"

   def test(self, grayScale):
        temp = set_greyLevel(grayScale)
        print temp