summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2011-05-10 11:43:03 +0200
committerintrigeri <intrigeri@boum.org>2011-05-28 03:02:37 +0200
commitc86b24cc820d3cf98119dcb939598e2e62c2deb6 (patch)
treee97b05ec8523b8cd142dc19c92f9678e40aade40
parent78d705cb55d9b5b697905ff0c4e0741c6ddb2e08 (diff)
Use the built-in set type that supports a difference operator.bugfix/really_support_extlinux_absence
This means depending on Python 2.4 - hope this this OK.
-rwxr-xr-xliveusb/creator.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/liveusb/creator.py b/liveusb/creator.py
index dae51bb..d2b5c49 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -63,8 +63,8 @@ class LiveUSBCreator(object):
_drive = None # mountpoint of the currently selected drive
mb_per_sec = 0 # how many megabytes per second we can write
log = None
- ext_fstypes = ['ext2', 'ext3', 'ext4']
- valid_fstypes = ['vfat', 'msdos'] + ext_fstypes
+ ext_fstypes = set(['ext2', 'ext3', 'ext4'])
+ valid_fstypes = set(['vfat', 'msdos']) | ext_fstypes
drive = property(fget=lambda self: self.drives[self._drive],
fset=lambda self, d: self._set_drive(d))
@@ -425,9 +425,7 @@ class LinuxLiveUSBCreator(LiveUSBCreator):
super(LinuxLiveUSBCreator, self).__init__(*args, **kw)
extlinux = self.get_extlinux_version()
if extlinux is None:
- for type in self.ext_fstypes:
- # FIXME: more Python-ic way of doing this
- self.valid_fstypes.remove(type)
+ self.valid_fstypes -= self.ext_fstypes
elif extlinux < 4:
self.log.debug(_('You are using an old version of syslinux-extlinux '
'that does not support the ext4 filesystem'))