Handling An Exception In Python