Skip to content

TypeError: object of type 'bool' has no len() #13

Description

@inevity

found the self.RemoteServicesCache first {} dict type,then bool type .
Just add this code ,can enter into the local console.

	def CheckForService(self, service):

		query_args = {
			"method":"system.listService",
			"session":self.SessionID,
			"params":None,
			"id":self.ID
			}
		log.info("Rservicecache: {}".format(self.RemoteServicesCache))
		
		if self.RemoteServicesCache == False: // add here 
			return False                                   // add here 
		if not len(self.RemoteServicesCache):
			self.RemoteServicesCache = self.SendCall(query_args)
			if self.RemoteServicesCache == False:
				return False
		if service == 'dump':
			return

see rroller/dahua#6

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions