Quoting from #936663:
Python2 becomes end-of-live upstream, and Debian aims to remove
Python2 from the distribution, as discussed in
https://lists.debian.org/debian-python/2019/07/msg00080.html
Closes: #936663
Architecture: amd64 i386
Depends: kmod,
mtools,
Architecture: amd64 i386
Depends: kmod,
mtools,
- python,
- python-parted,
+ python3,
+ python3-parted,
rsync,
syslinux | grub2-common, syslinux | grub-pc-bin,
${misc:Depends},
rsync,
syslinux | grub2-common, syslinux | grub-pc-bin,
${misc:Depends},
# -*- coding: utf-8 -*-
# pylint: disable-msg=C0302
"""
# -*- coding: utf-8 -*-
# pylint: disable-msg=C0302
"""
-from __future__ import print_function
from optparse import OptionParser
from inspect import isroutine, isclass
import datetime
from optparse import OptionParser
from inspect import isroutine, isclass
import datetime
try:
unmount(device, "")
logging.debug('Unmounted %s' % device)
try:
unmount(device, "")
logging.debug('Unmounted %s' % device)
logging.debug('RuntimeError while umount %s, ignoring' % device)
for tmppath in TMPFILES.copy():
logging.debug('RuntimeError while umount %s, ignoring' % device)
for tmppath in TMPFILES.copy():
os.unlink(tmppath)
logging.debug('temporary file %s deleted' % tmppath)
unregister_tmpfile(tmppath)
os.unlink(tmppath)
logging.debug('temporary file %s deleted' % tmppath)
unregister_tmpfile(tmppath)
msg = 'RuntimeError while removing temporary %s, ignoring'
logging.debug(msg % tmppath)
msg = 'RuntimeError while removing temporary %s, ignoring'
logging.debug(msg % tmppath)
# update the existing flavours on the target
for line in fileinput.input([target_grml_version_file], inplace=1):
flavour = get_flavour(line)
# update the existing flavours on the target
for line in fileinput.input([target_grml_version_file], inplace=1):
flavour = get_flavour(line)
- if flavour in iso_versions.keys():
+ if flavour in list(iso_versions.keys()):
print(iso_versions.pop(flavour))
else:
print(line.strip())
print(iso_versions.pop(flavour))
else:
print(line.strip())
logging.debug('Unmounted %s' % efi_mountpoint)
os.rmdir(efi_mountpoint)
logging.debug('Removed directory %s' % efi_mountpoint)
logging.debug('Unmounted %s' % efi_mountpoint)
os.rmdir(efi_mountpoint)
logging.debug('Removed directory %s' % efi_mountpoint)
logging.critical('RuntimeError while umount %s' % efi_mountpoint)
sys.exit(1)
logging.critical('RuntimeError while umount %s' % efi_mountpoint)
sys.exit(1)
if options.force or os.path.exists(os.path.join(image, 'live')):
logging.info("Using %s as install base", image)
else:
if options.force or os.path.exists(os.path.join(image, 'live')):
logging.info("Using %s as install base", image)
else:
- q = raw_input("%s does not look like a Grml system. "
+ q = input("%s does not look like a Grml system. "
"Do you really want to use this image? y/N " % image)
if q.lower() == 'y':
logging.info("Using %s as install base", image)
"Do you really want to use this image? y/N " % image)
if q.lower() == 'y':
logging.info("Using %s as install base", image)
print("Forcing mkfs.fat16 on %s as requested via option --force." % device)
else:
# make sure the user is aware of what he is doing
print("Forcing mkfs.fat16 on %s as requested via option --force." % device)
else:
# make sure the user is aware of what he is doing
- f = raw_input("Are you sure you want to format the specified partition with fat16? y/N ")
+ f = input("Are you sure you want to format the specified partition with fat16? y/N ")
if f == "y" or f == "Y":
logging.info("Note: you can skip this question using the option --force")
else:
if f == "y" or f == "Y":
logging.info("Note: you can skip this question using the option --force")
else:
if not os.path.isdir(device) and not check_for_usbdevice(device) and not options.force:
print("Warning: the specified device %s does not look like a removable usb device." % device)
if not os.path.isdir(device) and not check_for_usbdevice(device) and not options.force:
print("Warning: the specified device %s does not look like a removable usb device." % device)
- f = raw_input("Do you really want to continue? y/N ")
+ f = input("Do you really want to continue? y/N ")
if f.lower() != "y":
sys.exit(1)
if f.lower() != "y":
sys.exit(1)
print("Instead of using grml2usb /path/to/iso %s you might" % device)
print("want to use grml2usb /path/to/iso /dev/... instead.")
print("Please check out the grml2usb manpage for details.")
print("Instead of using grml2usb /path/to/iso %s you might" % device)
print("want to use grml2usb /path/to/iso /dev/... instead.")
print("Please check out the grml2usb manpage for details.")
- f = raw_input("Do you really want to continue? y/N ")
+ f = input("Do you really want to continue? y/N ")
if f.lower() != "y":
sys.exit(1)
if f.lower() != "y":
sys.exit(1)