mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
remove parens from return operator
This commit is contained in:
parent
f1b6a68206
commit
5f41846d4c
@ -32,11 +32,11 @@ skylerTest=0
|
|||||||
def filedate(path):
|
def filedate(path):
|
||||||
global FileDateCache
|
global FileDateCache
|
||||||
if (FileDateCache.has_key(path)):
|
if (FileDateCache.has_key(path)):
|
||||||
return(FileDateCache[path])
|
return FileDateCache[path]
|
||||||
try: date = os.path.getmtime(path)
|
try: date = os.path.getmtime(path)
|
||||||
except: date = 0
|
except: date = 0
|
||||||
FileDateCache[path] = date
|
FileDateCache[path] = date
|
||||||
return(date)
|
return date
|
||||||
|
|
||||||
def updatefiledate(path):
|
def updatefiledate(path):
|
||||||
global FileDateCache
|
global FileDateCache
|
||||||
@ -50,12 +50,12 @@ def youngest(files):
|
|||||||
if (source==0):
|
if (source==0):
|
||||||
import pdb; pdb.set_trace()
|
import pdb; pdb.set_trace()
|
||||||
sys.exit("Error: source file not readable: "+files)
|
sys.exit("Error: source file not readable: "+files)
|
||||||
return(source)
|
return source
|
||||||
result = 0
|
result = 0
|
||||||
for sfile in files:
|
for sfile in files:
|
||||||
source = youngest(sfile)
|
source = youngest(sfile)
|
||||||
if (source > result): result = source
|
if (source > result): result = source
|
||||||
return(result)
|
return result
|
||||||
|
|
||||||
def debug_older(file,others):
|
def debug_older(file,others):
|
||||||
print [file, others]
|
print [file, others]
|
||||||
@ -71,11 +71,11 @@ def older(file,others):
|
|||||||
|
|
||||||
def xpaths(prefix,base,suffix):
|
def xpaths(prefix,base,suffix):
|
||||||
if (type(base) == str):
|
if (type(base) == str):
|
||||||
return(prefix + base + suffix)
|
return prefix + base + suffix
|
||||||
result = []
|
result = []
|
||||||
for x in base:
|
for x in base:
|
||||||
result.append(xpaths(prefix,x,suffix))
|
result.append(xpaths(prefix,x,suffix))
|
||||||
return(result)
|
return result
|
||||||
|
|
||||||
if (sys.platform == "win32"):
|
if (sys.platform == "win32"):
|
||||||
import _winreg
|
import _winreg
|
||||||
@ -195,14 +195,14 @@ def buildingwhat(opts):
|
|||||||
building = 0
|
building = 0
|
||||||
for x in opts:
|
for x in opts:
|
||||||
if (x[:9]=="BUILDING_"): building = x[9:]
|
if (x[:9]=="BUILDING_"): building = x[9:]
|
||||||
return(building)
|
return building
|
||||||
|
|
||||||
def ReadFile(wfile):
|
def ReadFile(wfile):
|
||||||
try:
|
try:
|
||||||
srchandle = open(wfile, "rb")
|
srchandle = open(wfile, "rb")
|
||||||
data = srchandle.read()
|
data = srchandle.read()
|
||||||
srchandle.close()
|
srchandle.close()
|
||||||
return(data)
|
return data
|
||||||
except: sys.exit("Cannot read "+wfile)
|
except: sys.exit("Cannot read "+wfile)
|
||||||
|
|
||||||
def WriteFile(wfile,data):
|
def WriteFile(wfile,data):
|
||||||
@ -902,9 +902,9 @@ MakeDirectory(PREFIX+"/tmp")
|
|||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
def PkgSelected(pkglist, pkg):
|
def PkgSelected(pkglist, pkg):
|
||||||
if (pkglist.count(pkg)==0): return(0)
|
if (pkglist.count(pkg)==0): return 0
|
||||||
if (OMIT.count(pkg)): return(0)
|
if (OMIT.count(pkg)): return 0
|
||||||
return(1)
|
return 1
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
##
|
##
|
||||||
@ -1036,7 +1036,7 @@ CxxDependencyCache = {}
|
|||||||
def CxxCalcDependencies(srcfile, ipath, ignore):
|
def CxxCalcDependencies(srcfile, ipath, ignore):
|
||||||
if (CxxDependencyCache.has_key(srcfile)):
|
if (CxxDependencyCache.has_key(srcfile)):
|
||||||
return CxxDependencyCache[srcfile]
|
return CxxDependencyCache[srcfile]
|
||||||
if (ignore.count(srcfile)): return([])
|
if (ignore.count(srcfile)): return []
|
||||||
dep = {}
|
dep = {}
|
||||||
dep[srcfile] = 1
|
dep[srcfile] = 1
|
||||||
includes = CxxGetIncludes(srcfile)
|
includes = CxxGetIncludes(srcfile)
|
||||||
@ -1126,7 +1126,7 @@ def CopyAllFiles(dstdir,srcdir):
|
|||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
def CopyTree(dstdir,srcdir):
|
def CopyTree(dstdir,srcdir):
|
||||||
if (os.path.isdir(dstdir)): return(0)
|
if (os.path.isdir(dstdir)): return 0
|
||||||
if (COMPILER=="MSVC7"): cmd = "xcopy.exe /I/Y/E/Q \""+srcdir+"\" \""+dstdir+"\""
|
if (COMPILER=="MSVC7"): cmd = "xcopy.exe /I/Y/E/Q \""+srcdir+"\" \""+dstdir+"\""
|
||||||
if (COMPILER=="LINUXA"): cmd = "cp --recursive --force "+srcdir+" "+dstdir
|
if (COMPILER=="LINUXA"): cmd = "cp --recursive --force "+srcdir+" "+dstdir
|
||||||
oscmd(cmd)
|
oscmd(cmd)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user