Fixed SyntaxWarning: invalid escape sequence '\.' and suppress a deprecation warning

This commit is contained in:
Kazunari Sekigawa 2024-10-25 06:25:02 +09:00
parent a983603dbc
commit f00ede729d
2 changed files with 5 additions and 3 deletions

View File

@ -499,7 +499,7 @@ def GetKLayoutVersionFrom( verfile='version.h' ):
except Exception as e: except Exception as e:
return version return version
verReg = re.compile( u'(KLAYOUT_VERSION=\")([0-9A-Z_a-z\.]+)(\")' ) verReg = re.compile( r'(KLAYOUT_VERSION=\")([0-9A-Z_a-z\.]+)(\")' )
for line in contents: for line in contents:
m = verReg.match(line) m = verReg.match(line)
if m: if m:

View File

@ -279,7 +279,7 @@ def CheckPkgDirectory():
# * LW-qt6MP.pkg.macos-Sonoma-release-Rmp33Pmp312 # * LW-qt6MP.pkg.macos-Sonoma-release-Rmp33Pmp312
#----------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------
# 0 1 2 3 4 5 6 7 # 0 1 2 3 4 5 6 7
patQRP = u'(ST|LW|HW|EX)([-])([qt5|qt6][0-9A-Za-z]+)([.]pkg[.])([A-Za-z]+[-][A-Za-z]+[-])(release|debug)([-])([0-9A-Za-z]+)' patQRP = r'(ST|LW|HW|EX)([-])([qt5|qt6][0-9A-Za-z]+)([.]pkg[.])([A-Za-z]+[-][A-Za-z]+[-])(release|debug)([-])([0-9A-Za-z]+)'
regQRP = re.compile(patQRP) regQRP = re.compile(patQRP)
if not regQRP.match(PkgDir): if not regQRP.match(PkgDir):
print( "! Cannot identify (Qt, Ruby, Python) from the package directory name" ) print( "! Cannot identify (Qt, Ruby, Python) from the package directory name" )
@ -721,7 +721,9 @@ def MakeTargetDMGFile(msg=""):
# The folder will open on mount. # The folder will open on mount.
#-------------------------------------------------------- #--------------------------------------------------------
print( ">>> (10) Setting volume bootability and startup disk options..." ) print( ">>> (10) Setting volume bootability and startup disk options..." )
command = "bless --folder %s --openfolder %s" % (MountDir, MountDir) #command = "bless --folder %s --openfolder %s" % (MountDir, MountDir)
#bless: The 'openfolder' option is deprecated
command = "bless --folder %s" % MountDir
os.system(command) os.system(command)
sleep(2) sleep(2)