def run(self, argv):
        try:
            """Primary function for the program
            Executes methods, displays help, and organizes formatting for services 
            using Discovery

            Args:
              cache: A cache, which may already contain objects to be used
              argv: The arguments, parsed into a list as from the command line
            """
            # Determines if the help, format, or default is being called
            LOG.debug('Running Discovery...')
            isHelp = argv[0] == 'help'
            verbose = False
            if isHelp:
                argv = argv[1:]
                if argv[-1] == '--verbose' or argv[-1] == '-v':
                    verbose = True
                    argv = argv[:-1]

            http = httplib2.Http()

            LOG.debug('Parsing service...')
            # Fetches service, version, docs, etc.
            try:
                servicename, version, doc, args = self.docManager.run(argv, isHelp,
                                                                      verbose)
            except TypeError:
                return

            LOG.debug('Managing auth...')
            # Checks if credentials are needed and, if so, whether they are possessed.
            # If not, gets appropriate credentials.
            if 'auth' in doc:
                if '--force-auth' in args:
                    args.remove('--force-auth')
                    force_auth = True
                else:
                    force_auth = False
                http = authentication.authenticate(self.dataManager.email, servicename, doc, http,
                                                   self.dataManager.client_id, self.dataManager.client_secret, force_auth)

                # Builds the service and finds the method
                service = build_from_document(json.dumps(
                    doc), self.dataManager.base_url % DISCOVERY_URI, http=http)
            else:
                service = build_from_document(json.dumps(doc), DISCOVERY_URI % self.dataManager.base_url,
                                              developerKey=self.dataManager.devkey2, http=http)
            LOG.debug('Determining task...')
            try:
                metinfo, method, args = getMethod(service, doc, args)
            except:
                #LOG.error('Did not recognize task.')
                return

            LOG.debug('Parsing parameters...')
            try:
                kwargs = self.dataManager.fill_out_options(metinfo, doc, args)
            except TypeError, err:
                raise
                return

            LOG.debug('Executing method...')
            try:
                resp = method(**kwargs).execute()
            except Exception, err:
                LOG.error(err)
                return

            LOG.debug('Displaying output...')
            # Displays formatted output
            output.output(resp, self.dataManager.formatting)
        except Exception, err:
            print 'Uncaught error'
            raise
dataset/ETHPy150Open vinitkumar/googlecl/src/googlecl/discovery/__init__.py/DiscoveryManager.run/swapped operands of `%`