Always disable interpolation for ini parsers.
This commit is contained in:
parent
8cb2cbaed2
commit
7375eaa263
2
ghwt.py
2
ghwt.py
|
@ -43,7 +43,7 @@ def unpack(sproj, branch, outdir):
|
||||||
subprocess.check_call(['git', 'clone', '-b', branch, 'https://github.com/mesonbuild/{}.git'.format(sproj), outdir])
|
subprocess.check_call(['git', 'clone', '-b', branch, 'https://github.com/mesonbuild/{}.git'.format(sproj), outdir])
|
||||||
usfile = os.path.join(outdir, 'upstream.wrap')
|
usfile = os.path.join(outdir, 'upstream.wrap')
|
||||||
assert(os.path.isfile(usfile))
|
assert(os.path.isfile(usfile))
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser(interpolation=None)
|
||||||
config.read(usfile)
|
config.read(usfile)
|
||||||
us_url = config['wrap-file']['source_url']
|
us_url = config['wrap-file']['source_url']
|
||||||
us = urllib.request.urlopen(us_url, timeout=req_timeout).read()
|
us = urllib.request.urlopen(us_url, timeout=req_timeout).read()
|
||||||
|
|
|
@ -228,7 +228,7 @@ class UserFeatureOption(UserComboOption):
|
||||||
|
|
||||||
def load_configs(filenames: T.List[str]) -> configparser.ConfigParser:
|
def load_configs(filenames: T.List[str]) -> configparser.ConfigParser:
|
||||||
"""Load configuration files from a named subdirectory."""
|
"""Load configuration files from a named subdirectory."""
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser(interpolation=None)
|
||||||
config.read(filenames)
|
config.read(filenames)
|
||||||
return config
|
return config
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ def parse_patch_url(patch_url):
|
||||||
return arr[-3], int(arr[-2])
|
return arr[-3], int(arr[-2])
|
||||||
|
|
||||||
def get_current_version(wrapfile):
|
def get_current_version(wrapfile):
|
||||||
cp = configparser.ConfigParser()
|
cp = configparser.ConfigParser(interpolation=None)
|
||||||
cp.read(wrapfile)
|
cp.read(wrapfile)
|
||||||
cp = cp['wrap-file']
|
cp = cp['wrap-file']
|
||||||
patch_url = cp['patch_url']
|
patch_url = cp['patch_url']
|
||||||
|
|
Loading…
Reference in New Issue