def ListVersions(self):
    """Lists all versions for an app."""
    if len(self.args) == 0:
      if not self.options.app_id:
        self.parser.error('Expected <directory> argument or -A <app id>.')
      app_id = self.options.app_id
    elif len(self.args) == 1:
      if self.options.app_id:
        self.parser.error('<directory> argument is not needed with -A.')
      appyaml = self._ParseAppInfoFromYaml(self.args[0])
      app_id = appyaml.application
    else:
      self.parser.error('Expected 1 argument, not %d.' % len(self.args))

    rpcserver = self._GetRpcServer()
    response = rpcserver.Send('/api/versions/list', app_id=app_id)

    parsed_response = yaml.safe_load(response)
    if not parsed_response:
      print >> self.out_fh, (app_id % 'No versions uploaded for app: %s.')
    else:
      print >> self.out_fh, response
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/tools/appcfg.py/AppCfgApp.ListVersions/swapped operands of `%`