Alex Murray has proposed merging ~alexmurray/ubuntu-qa-tools:uvt-fix-python-3-12-deprecation-warnings into ubuntu-qa-tools:master.
Requested reviews: Ubuntu Bug Control (ubuntu-bugcontrol) For more details, see: https://code.launchpad.net/~alexmurray/ubuntu-qa-tools/+git/ubuntu-qa-tools/+merge/461223 -- Your team Ubuntu Bug Control is requested to review the proposed merge of ~alexmurray/ubuntu-qa-tools:uvt-fix-python-3-12-deprecation-warnings into ubuntu-qa-tools:master.
diff --git a/vm-tools/uvt b/vm-tools/uvt index 1de4d26..3ce32b3 100755 --- a/vm-tools/uvt +++ b/vm-tools/uvt @@ -2263,7 +2263,7 @@ def create_grub_cfg(temp_dir, iso_type, release_num, latest_release): grub_name = "boot/grub/grub.cfg" if iso_type == "server" and float(release_num) >= 20.10: - grub_contents = ''' + grub_contents = r''' set timeout=1 loadfont unicode @@ -2279,7 +2279,7 @@ menuentry "vmtools" { elif iso_type == "desktop" and float(release_num) >= 23.04: # The desktop installer keeps everything after the --- as the # default grub options, so order is important - grub_contents = ''' + grub_contents = r''' set timeout=1 loadfont unicode @@ -2808,7 +2808,7 @@ sed -i "s/XKBOPTIONS=\".*\"/XKBOPTIONS=\"%(options)s\"/" %(keyboard)s if 'vm_src_mirror' in uvt_conf: tmp_ssrc=uvt_conf['vm_src_mirror'] - late_contents += ''' + late_contents += r''' mv /etc/apt/sources.list /etc/apt/sources.list.ori echo deb %(tmp_m)s %(release)s main restricted universe multiverse > /etc/apt/sources.list echo deb %(tmp_m)s %(release)s-updates main restricted universe multiverse >> /etc/apt/sources.list @@ -2826,7 +2826,7 @@ echo deb-src %(tmp_ssrc)s %(release)s-security main restricted universe multiver if 'vm_mirror_fallback' in uvt_conf: tmp_mf = uvt_conf['vm_mirror_fallback'] - late_contents += ''' + late_contents += r''' echo deb %(tmp_mf)s %(release)s main restricted universe multiverse > /etc/apt/sources.list.d/fallback-sources.list echo deb %(tmp_mf)s %(release)s-updates main restricted universe multiverse >> /etc/apt/sources.list.d/fallback-sources.list echo \#deb %(tmp_mf)s %(release)s-proposed main restricted universe multiverse >> /etc/apt/sources.list.d/fallback-sources.list @@ -3456,7 +3456,12 @@ def load_uvt_config(): # Replace environment variables to be compatible with old shell vm-new for k in config: +<<<<<<< vm-tools/uvt config[k] = os.path.expandvars(config[k]) +======= + if "$HOME" in config[k]: + config[k] = re.sub(r"\$HOME", os.path.expanduser("~"), config[k]) +>>>>>>> vm-tools/uvt # Set default directories if config.get('vm_dir_iso', "") == "":
_______________________________________________ Mailing list: https://launchpad.net/~ubuntu-bugcontrol Post to : ubuntu-bugcontrol@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-bugcontrol More help : https://help.launchpad.net/ListHelp