def _clean_flags(args, caller):
 flags = ''
 if (args is None):
  return flags
 allowed = ('a', 'B', 'h', 'H', 'i', 'k', 'l', 'P', 't', 'T', 'x', 'v')
 for flag in args:
  if (flag in allowed):
   flags += flag
  else:
   raise CommandExecutionError('Invalid flag passed to {0}'.format(caller))
 return flags

def _clean_flags ( args , caller ) : flags = '' if ( args is None ) : return flags allowed = ( 'a' , 'B' , 'h' , 'H' , 'i' , 'k' , 'l' , 'P' , 't' , 'T' , 'x' , 'v' ) for flag in args : if ( flag in allowed ) : flags += flag else : raise CommandExecutionError ( 'Invalid flag passed to {0}' . format ( caller ) ) return flags
sanitize flags passed into df .