def validate_appname_or_none(option, value):
 if (value is None):
  return value
 validate_string(option, value)
 if (len(value.encode('utf-8')) > 128):
  raise ValueError(('%s must be <= 128 bytes' % (option,)))
 return value

def validate_appname_or_none ( option , value ) : if ( value is None ) : return value validate_string ( option , value ) if ( len ( value . encode ( 'utf-8' ) ) > 128 ) : raise ValueError ( ( '%s must be <= 128 bytes' % ( option , ) ) ) return value
validate the appname option .