Skip to content

Commit

Permalink
Make assignments that override abstract properties into simple attrib…
Browse files Browse the repository at this point in the history
…utes.

Related: storaged-project#12

See commit 3b50bf259ab8e1ce98969cf15e672459bbef5e18for a further
explanation.

Signed-off-by: mulhern <amulhern@redhat.com>
  • Loading branch information
mulkieran committed May 5, 2015
1 parent fde96b8 commit cc3e09b
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions blivet/formats/fslabeling.py
Expand Up @@ -61,8 +61,8 @@ def labelingArgs(self, label):

class Ext2FSLabeling(FSLabeling):

default_label = property(lambda s: "")
label_app = property(lambda s: fslabel.E2Label)
default_label = ""
label_app = fslabel.E2Label

def labelFormatOK(self, label):
return len(label) < 17
Expand All @@ -72,8 +72,8 @@ def labelingArgs(self, label):

class FATFSLabeling(FSLabeling):

default_label = property(lambda s: "NO NAME")
label_app = property(lambda s: fslabel.DosFsLabel)
default_label = "NO NAME"
label_app = fslabel.DosFsLabel

def labelFormatOK(self, label):
return len(label) < 12
Expand All @@ -83,8 +83,8 @@ def labelingArgs(self, label):

class JFSLabeling(FSLabeling):

default_label = property(lambda s: "")
label_app = property(lambda s: fslabel.JFSTune)
default_label = ""
label_app = fslabel.JFSTune

def labelFormatOK(self, label):
return len(label) < 17
Expand All @@ -94,8 +94,8 @@ def labelingArgs(self, label):

class ReiserFSLabeling(FSLabeling):

default_label = property(lambda s: "")
label_app = property(lambda s: fslabel.ReiserFSTune)
default_label = ""
label_app = fslabel.ReiserFSTune

def labelFormatOK(self, label):
return len(label) < 17
Expand All @@ -105,8 +105,8 @@ def labelingArgs(self, label):

class XFSLabeling(FSLabeling):

default_label = property(lambda s: "")
label_app = property(lambda s: fslabel.XFSAdmin)
default_label = ""
label_app = fslabel.XFSAdmin

def labelFormatOK(self, label):
return ' ' not in label and len(label) < 13
Expand All @@ -116,8 +116,8 @@ def labelingArgs(self, label):

class HFSLabeling(FSLabeling):

default_label = property(lambda s: "Untitled")
label_app = property(lambda s: None)
default_label = "Untitled"
label_app = None

def labelFormatOK(self, label):
return ':' not in label and len(label) < 28 and len(label) > 0
Expand All @@ -127,8 +127,8 @@ def labelingArgs(self, label):

class HFSPlusLabeling(FSLabeling):

default_label = property(lambda s: "Untitled")
label_app = property(lambda s: None)
default_label = "Untitled"
label_app = None

def labelFormatOK(self, label):
return ':' not in label and 0 < len(label) < 129
Expand All @@ -138,8 +138,8 @@ def labelingArgs(self, label):

class NTFSLabeling(FSLabeling):

default_label = property(lambda s: "")
label_app = property(lambda s: fslabel.NTFSLabel)
default_label = ""
label_app = fslabel.NTFSLabel

def labelFormatOK(self, label):
return len(label) < 129
Expand Down

3 comments on commit cc3e09b

@vpodzime
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit referenced in the commit message no longer exists, the hash should be updated in the final PR before it gets merged.

@mulkieran
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it is there. There is a missing space between the 8 and the f, now fixed.

@vpodzime
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

Please sign in to comment.