def main(args):
  tool = AppTool()

  if len(args.commands) == 0:
    ErrorExit('no commands specified')
  if args.commands[0] == 'devices':
    tool.listDevices()
  elif args.commands[0] == 'device-add':
    tool.addDevice(args.commands[1], args.commands[2], args.commands[3])
  elif args.commands[0] == 'profiles':
    tool.listProfiles()
  elif args.commands[0] == 'profile-get':
    tool.getProfile(args.commands[1])
  elif args.commands[0] == 'profile-edit':
    tool.editProfile(args.commands[1], args.commands[2:])
  else:
    ErrorExit('unknown command: %s' - args.commands[0])
dataset/ETHPy150Open viewfinderco/viewfinder/clients/ios/scripts/app-tool.py/main/operator `%` -> `-`