Browse Source

Add Volume.__str__()

Bahtiar `kalkin-` Gadimov 8 năm trước cách đây
mục cha
commit
8fc3772017
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      qubes/storage/__init__.py

+ 3 - 0
qubes/storage/__init__.py

@@ -99,6 +99,9 @@ class Volume(object):
     def __hash__(self):
         return hash('%s:%s %s' % (self.pool, self.vid, self.volume_type))
 
+    def __str__(self):
+        return "{!s}:{!s}".format(self.pool, self.vid)
+
 
 class Storage(object):
     ''' Class for handling VM virtual disks.