mirror of
https://github.com/ostreedev/ostree.git
synced 2025-02-22 09:57:44 +03:00
tests: Port the last python2 script to python3
This is not used by any test, nor is it packaged. Though let's just port it over to py3 to certify our codebase completely py2-free. I've manually checked that the script is still functional. Closes: #1546 Approved by: cgwalters
This commit is contained in:
parent
d56058bc9a
commit
8cfef187c5
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python
|
||||
#!/usr/bin/python3
|
||||
#
|
||||
# Copyright (C) 2015 Red Hat
|
||||
#
|
||||
@ -19,6 +19,7 @@
|
||||
|
||||
import os
|
||||
import sys
|
||||
import functools
|
||||
|
||||
if len(sys.argv) == 1:
|
||||
loaderpath = '/boot/loader/entries'
|
||||
@ -59,7 +60,7 @@ for fname in os.listdir(loaderpath):
|
||||
v = line[s+1:]
|
||||
entry[k] = v
|
||||
entries.append(entry)
|
||||
entries.sort(compare_entries_descending)
|
||||
entries.sort(key=functools.cmp_to_key(compare_entries_descending))
|
||||
|
||||
# Parse GRUB2 config
|
||||
with open(grub2path) as f:
|
||||
|
Loading…
x
Reference in New Issue
Block a user