mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
fix error parsing PandaVersion.pp with Python 3
This commit is contained in:
parent
66f4964c8b
commit
3241443077
@ -2352,7 +2352,7 @@ def CopyTree(dstdir, srcdir, omitCVS=True):
|
|||||||
|
|
||||||
def ParsePandaVersion(fn):
|
def ParsePandaVersion(fn):
|
||||||
try:
|
try:
|
||||||
f = file(fn, "r")
|
f = open(fn, "r")
|
||||||
pattern = re.compile('^[ \t]*[#][ \t]*define[ \t]+PANDA_VERSION[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)')
|
pattern = re.compile('^[ \t]*[#][ \t]*define[ \t]+PANDA_VERSION[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)')
|
||||||
for line in f:
|
for line in f:
|
||||||
match = pattern.match(line,0)
|
match = pattern.match(line,0)
|
||||||
@ -2365,7 +2365,7 @@ def ParsePandaVersion(fn):
|
|||||||
|
|
||||||
def ParsePluginVersion(fn):
|
def ParsePluginVersion(fn):
|
||||||
try:
|
try:
|
||||||
f = file(fn, "r")
|
f = open(fn, "r")
|
||||||
pattern = re.compile('^[ \t]*[#][ \t]*define[ \t]+P3D_PLUGIN_VERSION[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)')
|
pattern = re.compile('^[ \t]*[#][ \t]*define[ \t]+P3D_PLUGIN_VERSION[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)')
|
||||||
for line in f:
|
for line in f:
|
||||||
match = pattern.match(line,0)
|
match = pattern.match(line,0)
|
||||||
@ -2378,7 +2378,7 @@ def ParsePluginVersion(fn):
|
|||||||
|
|
||||||
def ParseCoreapiVersion(fn):
|
def ParseCoreapiVersion(fn):
|
||||||
try:
|
try:
|
||||||
f = file(fn, "r")
|
f = open(fn, "r")
|
||||||
pattern = re.compile('^[ \t]*[#][ \t]*define[ \t]+P3D_COREAPI_VERSION.*([0-9]+)[ \t]*$')
|
pattern = re.compile('^[ \t]*[#][ \t]*define[ \t]+P3D_COREAPI_VERSION.*([0-9]+)[ \t]*$')
|
||||||
for line in f:
|
for line in f:
|
||||||
match = pattern.match(line,0)
|
match = pattern.match(line,0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user