createvol: Only show file formats that can be created

This commit is contained in:
Cole Robinson 2011-03-08 13:57:56 -05:00
parent d90a28d997
commit 0b9c6fab97

View File

@ -155,7 +155,11 @@ class vmmCreateVolume(vmmGObjectUI):
def populate_vol_format(self):
model = self.window.get_widget("vol-format").get_model()
model.clear()
formats = self.vol_class.formats
if hasattr(self.vol_class, "create_formats"):
formats = getattr(self.vol_class, "create_formats")
for f in formats:
model.append([f, f])