From a7972f2f756788f50e71bb2a9e985f77fd140c5b Mon Sep 17 00:00:00 2001 From: Alec Warner Date: Fri, 7 Apr 2006 00:48:59 +0000 Subject: [PATCH] Change == None to is None svn path=/main/trunk/; revision=3085 --- bin/emerge | 20 ++++---- bin/repoman | 6 +-- pym/getbinpkg.py | 2 +- pym/portage.py | 104 ++++++++++++++++++++-------------------- pym/portage_file.py | 4 +- pym/portage_locks.py | 2 +- pym/portage_manifest.py | 2 +- pym/portage_util.py | 8 ++-- 8 files changed, 74 insertions(+), 74 deletions(-) diff --git a/bin/emerge b/bin/emerge index fa20e7511..4dbcfd76d 100755 --- a/bin/emerge +++ b/bin/emerge @@ -941,7 +941,7 @@ class depgraph: self.digraph.addnode(string.join(mybigkey),myparent) return 1 - if myuse == None: + if myuse is None: self.pkgsettings.setcpv(mykey) myuse = self.pkgsettings["USE"].split() self.applied_useflags[mykey] = myuse @@ -1651,7 +1651,7 @@ class depgraph: mysize=0 if x[0] == "ebuild" and x[-1]!="nomerge": myfilesdict=portage.portdb.getfetchsizes(x[2], useflags=self.applied_useflags[x[2]], debug=edebug) - if myfilesdict==None: + if myfilesdict is None: myfilesdict="[empty/missing/bad digest]" else: for myfetchfile in myfilesdict.keys(): @@ -1963,7 +1963,7 @@ class depgraph: retval=portage.doebuild(y,"fetch",myroot,self.pkgsettings,edebug,("--pretend" in myopts),fetchonly=1,fetchall=1,tree="porttree") else: retval=portage.doebuild(y,"fetch",myroot,self.pkgsettings,edebug,("--pretend" in myopts),fetchonly=1,tree="porttree") - if (retval == None) or retval: + if (retval is None) or retval: print print "!!! Fetch for",y,"failed, continuing..." print @@ -1978,7 +1978,7 @@ class depgraph: short_msg = "emerge: ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[pkgindex]+" Clean" emergelog(" === ("+str(mergecount)+" of "+str(len(mymergelist))+") Cleaning ("+x[pkgindex]+"::"+y+")", short_msg=short_msg) retval=portage.doebuild(y,"clean",myroot,self.pkgsettings,edebug,cleanup=1,tree="porttree") - if (retval == None): + if (retval is None): portage_util.writemsg("Unable to run required binary.\n") sys.exit(127) if retval: @@ -1986,7 +1986,7 @@ class depgraph: short_msg = "emerge: ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[pkgindex]+" Compile" emergelog(" === ("+str(mergecount)+" of "+str(len(mymergelist))+") Compiling/Packaging ("+x[pkgindex]+"::"+y+")", short_msg=short_msg) retval=portage.doebuild(y,"package",myroot,self.pkgsettings,edebug,tree="porttree") - if (retval == None): + if (retval is None): portage_util.writemsg("Unable to run required binary.\n") sys.exit(127) if retval: @@ -2002,13 +2002,13 @@ class depgraph: self.pkgsettings.backup_changes("EMERGE_FROM") retval=portage.pkgmerge(mytbz2,myroot,self.pkgsettings) - if retval==None: + if retval is None: sys.exit(1) else: short_msg = "emerge: ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[pkgindex]+" Clean" emergelog(" === ("+str(mergecount)+" of "+str(len(mymergelist))+") Cleaning ("+x[pkgindex]+"::"+y+")", short_msg=short_msg) retval=portage.doebuild(y,"clean",myroot,self.pkgsettings,edebug,cleanup=1,tree="porttree") - if (retval == None): + if (retval is None): portage_util.writemsg("Unable to run required binary.\n") sys.exit(127) if retval: @@ -2016,7 +2016,7 @@ class depgraph: short_msg = "emerge: ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[pkgindex]+" Compile" emergelog(" === ("+str(mergecount)+" of "+str(len(mymergelist))+") Compiling/Merging ("+x[pkgindex]+"::"+y+")", short_msg=short_msg) retval=portage.doebuild(y,"merge",myroot,self.pkgsettings,edebug,tree="porttree") - if (retval == None): + if (retval is None): portage_util.writemsg("Unable to run required binary.\n") sys.exit(127) if retval: @@ -2037,7 +2037,7 @@ class depgraph: short_msg = "emerge: ("+str(mergecount)+" of "+str(len(mymergelist))+") "+x[pkgindex]+" Merge Binary" emergelog(" === ("+str(mergecount)+" of "+str(len(mymergelist))+") Merging Binary ("+x[pkgindex]+"::"+mytbz2+")", short_msg=short_msg) retval=portage.pkgmerge(mytbz2,x[1],self.pkgsettings) - if retval==None: + if retval is None: sys.exit(1) #need to check for errors if "--buildpkgonly" not in myopts: @@ -2652,7 +2652,7 @@ if myaction in ["sync","metadata"] and (not "--help" in myopts): retries=0 hostname, port=re.split("rsync://([^:/]*)(:[0-9]+)?", syncuri)[1:3]; - if port==None: + if port is None: port="" updatecache_flg=True diff --git a/bin/repoman b/bin/repoman index 123b5672d..4a46196a5 100755 --- a/bin/repoman +++ b/bin/repoman @@ -347,7 +347,7 @@ if len(sys.argv)>1: elif sys.argv[x] in repoman_shortoptions.keys(): sys.argv[x] = repoman_shortoptions[sys.argv[x]] if sys.argv[x] in modes: - if mymode==None: + if mymode is None: mymode=sys.argv[x] else: err("Please specify either \""+mymode+"\" or \""+sys.argv[x]+"\", but not both.") @@ -368,7 +368,7 @@ if len(sys.argv)>1: else: err_help("\""+sys.argv[x]+"\" is not a valid mode or option.") x=x+1 -if mymode==None: +if mymode is None: mymode="scan" if mymode=="help" or ("--help" in myoptions): help(exitstatus=0) @@ -942,7 +942,7 @@ for x in scanlist: stats["digest.missing"]=stats["digest.missing"]+1 fails["digest.missing"].append(x+"/files/digest-"+y) myesplit=portage.pkgsplit(y) - if myesplit==None or not valid_ebuild_name(x.split("/")[0]+"/"+y): + if myesplit is None or not valid_ebuild_name(x.split("/")[0]+"/"+y): stats["ebuild.invalidname"]=stats["ebuild.invalidname"]+1 fails["ebuild.invalidname"].append(x+"/"+y+".ebuild") continue diff --git a/pym/getbinpkg.py b/pym/getbinpkg.py index d9c9810f5..197d777bf 100644 --- a/pym/getbinpkg.py +++ b/pym/getbinpkg.py @@ -418,7 +418,7 @@ def dir_get_metadata(baseurl, conn=None, chunk_size=3000, verbose=1, usingcache= else: keepconnection = 1 - if makepickle == None: + if makepickle is None: makepickle = "/var/cache/edb/metadata.idx.most_recent" conn,protocol,address,params,headers = create_conn(baseurl, conn) diff --git a/pym/portage.py b/pym/portage.py index 41f73407a..2cfbed407 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -371,7 +371,7 @@ class digraph: def addnode(self,mykey,myparent): if not self.dict.has_key(mykey): self.okeys.append(mykey) - if myparent==None: + if myparent is None: self.dict[mykey]=[0,[]] else: self.dict[mykey]=[0,[myparent]] @@ -545,7 +545,7 @@ def env_update(makelinks=1): if x[-1]=='~' or x[-4:]==".bak": continue myconfig=getconfig(root+"etc/env.d/"+x) - if myconfig==None: + if myconfig is None: writemsg("!!! Parsing error in "+str(root)+"etc/env.d/"+str(x)+"\n") #parse error continue @@ -863,7 +863,7 @@ def autouse(myvartree,use_cache=1): global usedefaults, autouse_val if autouse_val is not None: return autouse_val - if profiledir==None: + if profiledir is None: autouse_val = "" return "" myusevars="" @@ -967,7 +967,7 @@ class config: self.module_priority = ["user","default"] self.modules = {} self.modules["user"] = getconfig(MODULES_FILE_PATH) - if self.modules["user"] == None: + if self.modules["user"] is None: self.modules["user"] = {} self.modules["default"] = { "portdbapi.metadbmodule": "cache.metadata.database", @@ -1029,7 +1029,7 @@ class config: mygcfg_dlists = [getconfig(os.path.join(x, "make.globals")) for x in self.profiles+["/etc"]] self.mygcfg = stack_dicts(mygcfg_dlists, incrementals=portage_const.INCREMENTALS, ignore_none=1) - if self.mygcfg == None: + if self.mygcfg is None: self.mygcfg = {} except SystemExit, e: raise @@ -1047,7 +1047,7 @@ class config: mygcfg_dlists = [getconfig(os.path.join(x, "make.defaults")) for x in self.profiles] self.mygcfg = stack_dicts(mygcfg_dlists, incrementals=portage_const.INCREMENTALS, ignore_none=1) #self.mygcfg = grab_stacked("make.defaults", self.profiles, getconfig) - if self.mygcfg == None: + if self.mygcfg is None: self.mygcfg = {} except SystemExit, e: raise @@ -1063,7 +1063,7 @@ class config: try: # XXX: Should depend on root? self.mygcfg=getconfig("/"+MAKE_CONF_FILE,allow_sourcing=True) - if self.mygcfg == None: + if self.mygcfg is None: self.mygcfg = {} except SystemExit, e: raise @@ -1590,7 +1590,7 @@ class config: def __getitem__(self,mykey): match = '' for x in self.lookuplist: - if x == None: + if x is None: writemsg("!!! lookuplist is null.\n") elif x.has_key(mykey): match = x[mykey] @@ -2074,7 +2074,7 @@ def digestgen(myarchives,mysettings,db=None,overwrite=1,manifestonly=0): # (e.g. cvs stuff should be in ebuild(1) and/or repoman) # TODO: error/exception handling - if db == None: + if db is None: db = portagetree().dbapi mf = Manifest(mysettings["O"], db, mysettings) @@ -2084,7 +2084,7 @@ def digestgen(myarchives,mysettings,db=None,overwrite=1,manifestonly=0): mytype = mf.guessType(f) if mytype == "AUX": f = f[5:] - elif mytype == None: + elif mytype is None: continue myrealtype = mf.findFile(f) if myrealtype != None: @@ -2118,9 +2118,9 @@ def digestParseFile(myfilename,mysettings=None,db=None): elif mysplit[-1] == "Manifest": pkgdir = os.sep+os.sep.join(mysplit[:-1]) - if db == None: + if db is None: db = portagetree().dbapi - if mysettings == None: + if mysettings is None: mysettings = config(clone=settings) mf = Manifest(pkgdir, db, mysettings) @@ -2205,7 +2205,7 @@ def digestcheck(myfiles, mysettings, strict=0, justmanifest=0, db=None): portage_manifest.Manifest().""" pkgdir = mysettings["O"] - if db == None: + if db is None: db = portagetree().dbapi mf = Manifest(pkgdir, db, mysettings) try: @@ -2265,14 +2265,14 @@ def digestcheck(myfiles, mysettings, strict=0, justmanifest=0, db=None): return 0 mydigests=digestParseFile(digestfn) - if mydigests==None: + if mydigests is None: print "!!! Failed to parse digest file:",digestfn return 0 mymdigests=digestParseFile(manifestfn) if "strict" not in features: # XXX: Remove this when manifests become mainstream. pass - elif mymdigests==None: + elif mymdigests is None: print "!!! Failed to parse manifest file:",manifestfn if strict: return 0 @@ -2369,7 +2369,7 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, t mypv = os.path.basename(ebuild_path)[:-7] mycpv = cat+"/"+mypv mysplit=pkgsplit(mypv,silent=0) - if mysplit==None: + if mysplit is None: writemsg("!!! Error: PF is null '%s'; exiting.\n" % mypv) return 1 if mydo != "depend": @@ -3294,7 +3294,7 @@ def dep_check(depstring,mydbapi,mysettings,use="yes",mode=None,myuse=None,use_ca #check_config_instance(mysettings) if use=="yes": - if myuse==None: + if myuse is None: #default behavior myusesplit = string.split(mysettings["USE"]) else: @@ -3333,17 +3333,17 @@ def dep_check(depstring,mydbapi,mysettings,use="yes",mode=None,myuse=None,use_ca #convert virtual dependencies to normal packages. mysplit=dep_virtual(mysplit, mysettings) - #if mysplit==None, then we have a parse error (paren mismatch or misplaced ||) + #if mysplit is None, then we have a parse error (paren mismatch or misplaced ||) #up until here, we haven't needed to look at the database tree - if mysplit==None: + if mysplit is None: return [0,"Parse Error (parentheses mismatch?)"] elif mysplit==[]: #dependencies were reduced to nothing return [1,[]] mysplit2=mysplit[:] mysplit2=dep_wordreduce(mysplit2,mysettings,mydbapi,mode,use_cache=use_cache) - if mysplit2==None: + if mysplit2 is None: return [0,"Invalid token"] writemsg("\n\n\n", 1) @@ -3635,7 +3635,7 @@ class packagetree: def best(mymatches): "accepts None arguments; assumes matches are valid." global bestcount - if mymatches==None: + if mymatches is None: return "" if not len(mymatches): return "" @@ -3724,10 +3724,10 @@ def match_from_list(mydep,candidate_list): mylist = [] - if operator == None: + if operator is None: for x in candidate_list: xs = pkgsplit(x) - if xs == None: + if xs is None: if x != mycpv: continue elif xs[0] != mycpv: @@ -3762,7 +3762,7 @@ def match_from_list(mydep,candidate_list): except: writemsg("\nInvalid package name: %s\n" % x) sys.exit(73) - if result == None: + if result is None: continue elif operator == ">": if result > 0: @@ -3792,13 +3792,13 @@ def match_from_list_original(mydep,mylist): mycpv=dep_getcpv(mydep) if isspecific(mycpv): cp_key=catpkgsplit(mycpv) - if cp_key==None: + if cp_key is None: return [] else: cp_key=None #Otherwise, this is a special call; we can only select out of the ebuilds specified in the specified mylist if (mydep[0]=="="): - if cp_key==None: + if cp_key is None: return [] if mydep[-1]=="*": #example: "=sys-apps/foo-1.0*" @@ -3822,7 +3822,7 @@ def match_from_list_original(mydep,mylist): cmp2=[cp_key[1],new_v,"r0"] for x in mylist: cp_x=catpkgsplit(x) - if cp_x==None: + if cp_x is None: #hrm, invalid entry. Continue. continue #skip entries in our list that do not have matching categories @@ -3840,7 +3840,7 @@ def match_from_list_original(mydep,mylist): else: return [] elif (mydep[0]==">") or (mydep[0]=="<"): - if cp_key==None: + if cp_key is None: return [] if (len(mydep)>1) and (mydep[1]=="="): cmpstr=mydep[0:2] @@ -3849,7 +3849,7 @@ def match_from_list_original(mydep,mylist): mynodes=[] for x in mylist: cp_x=catpkgsplit(x) - if cp_x==None: + if cp_x is None: #invalid entry; continue. continue if cp_key[0]!=cp_x[0]: @@ -3858,12 +3858,12 @@ def match_from_list_original(mydep,mylist): mynodes.append(x) return mynodes elif mydep[0]=="~": - if cp_key==None: + if cp_key is None: return [] myrev=-1 for x in mylist: cp_x=catpkgsplit(x) - if cp_x==None: + if cp_x is None: #invalid entry; continue continue if cp_key[0]!=cp_x[0]: @@ -3879,7 +3879,7 @@ def match_from_list_original(mydep,mylist): return [] else: return [mymatch] - elif cp_key==None: + elif cp_key is None: if mydep[0]=="!": return [] #we check ! deps in emerge itself, so always returning [] is correct. @@ -3887,7 +3887,7 @@ def match_from_list_original(mydep,mylist): cp_key=mycpv.split("/") for x in mylist: cp_x=catpkgsplit(x) - if cp_x==None: + if cp_x is None: #invalid entry; continue continue if cp_key[0]!=cp_x[0]: @@ -3916,14 +3916,14 @@ class portagetree: def dep_bestmatch(self,mydep): "compatibility method" mymatch=self.dbapi.xmatch("bestmatch-visible",mydep) - if mymatch==None: + if mymatch is None: return "" return mymatch def dep_match(self,mydep): "compatibility method" mymatch=self.dbapi.xmatch("match-visible",mydep) - if mymatch==None: + if mymatch is None: return [] return mymatch @@ -4150,7 +4150,7 @@ class bindbapi(fakedbapi): mylist.append("") else: myval = tbz2.getfile(x) - if myval == None: + if myval is None: myval = "" else: myval = string.join(myval.split(),' ') @@ -4338,7 +4338,7 @@ class vardbapi(dbapi): return cpc[1] list=listdir(self.root+VDB_PATH+"/"+mysplit[0],EmptyOnError=1) - if (list==None): + if (list is None): return [] returnme=[] for x in list: @@ -4363,7 +4363,7 @@ class vardbapi(dbapi): basepath = self.root+VDB_PATH+"/" mycats = self.categories - if mycats == None: + if mycats is None: # XXX: CIRCULAR DEP! This helps backwards compat. --NJ (10 Sept 2004) mycats = settings.categories @@ -4499,7 +4499,7 @@ class vartree(packagetree): "compatibility method -- all matches, not just visible ones" #mymatch=best(match(dep_expand(mydep,self.dbapi),self.dbapi)) mymatch=best(self.dbapi.match(dep_expand(mydep,mydb=self.dbapi),use_cache=use_cache)) - if mymatch==None: + if mymatch is None: return "" else: return mymatch @@ -4508,7 +4508,7 @@ class vartree(packagetree): "compatibility method -- we want to see all matches, not just visible ones" #mymatch=match(mydep,self.dbapi) mymatch=self.dbapi.match(mydep,use_cache=use_cache) - if mymatch==None: + if mymatch is None: return [] else: return mymatch @@ -4885,7 +4885,7 @@ class portdbapi(dbapi): return returnme def getfetchlist(self,mypkg,useflags=None,mysettings=None,all=0): - if mysettings == None: + if mysettings is None: mysettings = self.mysettings try: myuris = self.aux_get(mypkg,["SRC_URI"])[0] @@ -4915,7 +4915,7 @@ class portdbapi(dbapi): if debug: print "[empty/missing/bad digest]: "+mypkg return None filesdict={} - if useflags == None: + if useflags is None: myuris, myfiles = self.getfetchlist(mypkg,all=1) else: myuris, myfiles = self.getfetchlist(mypkg,useflags=useflags) @@ -4957,7 +4957,7 @@ class portdbapi(dbapi): # we use getfetchsizes() now, so this function would be obsoleted # filesdict=self.getfetchsizes(mypkg,useflags=useflags,debug=debug) - if filesdict==None: + if filesdict is None: return "[empty/missing/bad digest]" mysize=0 for myfile in filesdict.keys(): @@ -5064,7 +5064,7 @@ class portdbapi(dbapi): """two functions in one. Accepts a list of cpv values and uses the package.mask *and* packages file to remove invisible entries, returning remaining items. This function assumes that all entries in mylist have the same category and package name.""" - if (mylist==None) or (len(mylist)==0): + if (mylist is None) or (len(mylist)==0): return [] newlist=mylist[:] #first, we mask out packages in the package.mask file @@ -5080,7 +5080,7 @@ class portdbapi(dbapi): if maskdict.has_key(mycp): for x in maskdict[mycp]: mymatches=self.xmatch("match-all",x) - if mymatches==None: + if mymatches is None: #error in package.mask file; print warning and continue: print "visible(): package.mask entry \""+x+"\" is invalid, ignoring..." continue @@ -5105,7 +5105,7 @@ class portdbapi(dbapi): #notice how we pass "newlist" to the xmatch() call below.... #Without this, ~ deps in the packages files are broken. mymatches=self.xmatch("match-list",x,mylist=newlist) - if mymatches==None: + if mymatches is None: #error in packages file; print warning and continue: print "emerge: visible(): profile packages entry \""+x+"\" is invalid, ignoring..." continue @@ -5120,7 +5120,7 @@ class portdbapi(dbapi): def gvisible(self,mylist): "strip out group-masked (not in current group) entries" global groups - if mylist==None: + if mylist is None: return [] newlist=[] @@ -5392,7 +5392,7 @@ class binarytree(packagetree): writemsg("mykey: %s\n" % mykey, 1) mymatch=best(match_from_list(mydep,self.dbapi.cp_list(mykey))) writemsg("mymatch: %s\n" % mymatch, 1) - if mymatch==None: + if mymatch is None: return "" return mymatch @@ -6135,7 +6135,7 @@ class dblink: else: mydest = new_protect_filename(myrealdest, newmd5=portage_checksum.perform_md5(myabsto)) - # if secondhand==None it means we're operating in "force" mode and should not create a second hand. + # if secondhand is None it means we're operating in "force" mode and should not create a second hand. if (secondhand!=None) and (not os.path.exists(myrealto)): # either the target directory doesn't exist yet or the target file doesn't exist -- or # the target is a broken symlink. We will add this file to our "second hand" and merge @@ -6178,7 +6178,7 @@ class dblink: bsd_chflags.lchflags(mydest, dflags) else: # a non-directory and non-symlink-to-directory. Won't work for us. Move out of the way. - if movefile(mydest,mydest+".backup", mysettings=self.settings) == None: + if movefile(mydest,mydest+".backup", mysettings=self.settings) is None: sys.exit(1) print "bak",mydest,mydest+".backup" #now create our directory @@ -6271,7 +6271,7 @@ class dblink: # same way. Unless moveme=0 (blocking directory) if moveme: mymtime=movefile(mysrc,mydest,newmtime=thismtime,sstat=mystat, mysettings=self.settings) - if mymtime == None: + if mymtime is None: sys.exit(1) zing=">>>" else: @@ -6328,7 +6328,7 @@ class dblink: else: # we are merging a fifo or device node zing="!!!" - if mydmode==None: + if mydmode is None: # destination doesn't exist if movefile(mysrc,mydest,newmtime=thismtime,sstat=mystat, mysettings=self.settings)!=None: zing=">>>" diff --git a/pym/portage_file.py b/pym/portage_file.py index a0f1d3a4e..970d42fbb 100644 --- a/pym/portage_file.py +++ b/pym/portage_file.py @@ -19,9 +19,9 @@ def normpath(mypath): def makedirs(path, perms=0755, uid=None, gid=None, must_chown=False): old_umask = os.umask(0) - if(uid == None): + if(uid is None): uid = portage_data.portage_uid - if(gid == None): + if(gid is None): gid = portage_data.portage_gid if not path: raise portage_exception.InvalidParameter, _("Invalid path: type: '%(type)s' value: '%(path)s'") % {"path": path, "type": type(path)} diff --git a/pym/portage_locks.py b/pym/portage_locks.py index fcf503aeb..30946c437 100644 --- a/pym/portage_locks.py +++ b/pym/portage_locks.py @@ -154,7 +154,7 @@ def unlockfile(mytuple): return False try: - if myfd == None: + if myfd is None: myfd = os.open(lockfilename, os.O_WRONLY,0660) unlinkfile = 1 locking_method(myfd,fcntl.LOCK_UN) diff --git a/pym/portage_manifest.py b/pym/portage_manifest.py index 6881c924d..61dc7c18b 100644 --- a/pym/portage_manifest.py +++ b/pym/portage_manifest.py @@ -103,7 +103,7 @@ class Manifest(object): mytype = self.guessType(myname) if mytype == "AUX" and myname.startswith("files"+os.sep): myname = myname[6:] - if mytype == None: + if mytype is None: continue mysize = int(mysplit[3]) myhashes = {mysplit[0]: mysplit[1]} diff --git a/pym/portage_util.py b/pym/portage_util.py index 5c128d59d..bd35e9a10 100644 --- a/pym/portage_util.py +++ b/pym/portage_util.py @@ -73,9 +73,9 @@ def stack_dictlist(original_dicts, incremental=0, incrementals=[], ignore_none=0 final_dict = None kill_list = {} for mydict in original_dicts: - if mydict == None: + if mydict is None: continue - if final_dict == None: + if final_dict is None: final_dict = {} for y in mydict.keys(): if not final_dict.has_key(y): @@ -103,12 +103,12 @@ def stack_dicts(dicts, incremental=0, incrementals=[], ignore_none=0): Returns a single dict.""" final_dict = None for mydict in dicts: - if mydict == None: + if mydict is None: if ignore_none: continue else: return None - if final_dict == None: + if final_dict is None: final_dict = {} for y in mydict.keys(): if mydict[y]: -- 2.26.2