Validación de datos - Python 2.7

Este es el código que he editado hasta ahora para el próximo código preliminar AS computing. Es la tarea y estoy atascado en cuanto a por qué no funciona. ¿Alguna sugerencia? Gracias

def GetKeyForCaesarCipher():  
  while True:
    key = int(raw_input('Enter the amount that shifts the plaintext alphabet to the ciphertext alphabet: '))
    try:
      i = int(key)
      break
    except ValueError:
      print 'please enter an interger'
    return (key)

Respuestas a la pregunta(1)

Su respuesta a la pregunta