Package: live-wrapper Severity: important Version: 0.6 Attached are some patches for live-wrapper git head. bootloader.py ========= * Change 'f' to 'langlist_file'. More human readable and linting friendly. cdroot.py ====== * Update class to use modern style. * Add file head text. Based on original commit. Both patches include minor trailing white space cleaning Regards Phil -- *** If this is a mailing list, I am subscribed, no need to CC me.*** Playing the game for the games sake. Web: https://kathenas.org Twitter: kathenasorg Instagram: kathenasorg
diff --git a/lwr/bootloader.py b/lwr/bootloader.py
index 69c27a2..b0c0cb3 100644
--- a/lwr/bootloader.py
+++ b/lwr/bootloader.py
@@ -51,11 +51,11 @@ class BootloaderConfig(object):
# FIXME: need declarative paths
self.versions = detect_kernels(self.cdroot)
self.versions.sort(reverse=True)
- with open('/usr/share/live-wrapper/languagelist', 'r') as f:
- lines = f.readlines()
- lang_lines = [ line for line in lines if not line.startswith('#') ]
+ with open('/usr/share/live-wrapper/languagelist', 'r') as langlist_file:
+ lines = langlist_file.readlines()
+ lang_lines = [line for line in lines if not line.startswith('#')]
for line in lang_lines:
- language = line.split(';')
+ language = line.split(';')
for version in self.versions:
self.entries.append({
'description': '%s (%s)' % (language[1], language[0],),
diff --git a/lwr/cdroot.py b/lwr/cdroot.py
index 24d24eb..134ad72 100644
--- a/lwr/cdroot.py
+++ b/lwr/cdroot.py
@@ -1,8 +1,13 @@
+# live-wrapper - Wrapper for vmdebootstrap for creating live images
+# (C) Iain R. Learmonth 2015 <irl@debian.org>
+# See COPYING for terms of usage, modification and redistribution.
+#
+# lwr/cdroot.py - cdroot helpers
import os
import tempfile
-class CDRoot:
+class CDRoot(object):
def __init__(self, path=None):
if not path:
self.path = tempfile.mkdtemp()
@@ -13,6 +18,6 @@ class CDRoot:
def __getitem__(self, i):
return CDRoot(os.path.join(self.path, i))
-
+
def __str__(self):
return self.path
Attachment:
signature.asc
Description: This is a digitally signed message part