[PATCH aeolus-image-rubygem 3/3] Fix a bug with repeat invocations of .imported?
Matt Wagner
matt.wagner at redhat.com
Tue Dec 13 19:12:57 UTC 2011
Once an image that was not imported was loaded, all subsequent images
would respond_to?(:template). Just check @template.
---
lib/aeolus_image/model/warehouse/image.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/aeolus_image/model/warehouse/image.rb b/lib/aeolus_image/model/warehouse/image.rb
index 72c6c7d..7a06f0e 100644
--- a/lib/aeolus_image/model/warehouse/image.rb
+++ b/lib/aeolus_image/model/warehouse/image.rb
@@ -106,7 +106,7 @@ module Aeolus
# No template is created on imported images
def imported?
- !self.respond_to?(:template)
+ !@template
end
# template_xml.xpath(PATH).text => template_xpath(PATH)
--
1.7.6.4
More information about the aeolus-devel
mailing list