From 0b9c6fab970d729a28e11b80fb612d2924e85ccd Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Tue, 8 Mar 2011 13:57:56 -0500 Subject: [PATCH] createvol: Only show file formats that can be created --- src/virtManager/createvol.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/virtManager/createvol.py b/src/virtManager/createvol.py index a66f3d6c..feae42bc 100644 --- a/src/virtManager/createvol.py +++ b/src/virtManager/createvol.py @@ -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])