def validate_int_or_None(s):
 if (s == u'None'):
  s = None
 if (s is None):
  return None
 try:
  return int(s)
 except ValueError:
  raise ValueError((u'Could not convert "%s" to int' % s))

def validate_int_or_None ( s ) : if ( s == u'None' ) : s = None if ( s is None ) : return None try : return int ( s ) except ValueError : raise ValueError ( ( u'Could not convert "%s" to int' % s ) )
if not none .