Skip to content

Commit

Permalink
Define default mode and device_id_string in Mount
Browse files Browse the repository at this point in the history
self.mode is not a valid class member in the Mount abstract class,
but used in map_dev(). Although all the subclasses define it so
there is no runtime bug, define it to avoid confusion and
better readability.

Do the same thing for device_id_string as precaution too.

Partially fix bug 1037183

Change-Id: Ica32db1ca17c6ed967f2c310b1d54adeb5f4247c
  • Loading branch information
maoy committed Aug 25, 2012
1 parent 1e5914a commit 72815cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nova/virt/disk/mount.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class Mount(object):
to be called in that order.
"""

mode = device_id_string = None # to be overridden in subclasses

def __init__(self, image, mount_dir, partition=None, device=None):

# Input
Expand Down

0 comments on commit 72815cf

Please sign in to comment.