Commit b349c125 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Use @property to create the os attribute in Image

Use the @property decorator instead of the property() method to create a
read-only os attribute in Image class.
parent 9cd8d4b8
......@@ -180,7 +180,8 @@ class Image(object):
self.guestfs_enabled = False
def _get_os(self):
def os(self):
"""Return an OS class instance for this image"""
if hasattr(self, "_os"):
return self._os
......@@ -195,8 +196,6 @@ class Image(object):
return self._os
os = property(_get_os)
def destroy(self):
"""Destroy this Image instance."""
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment