Skip to content

Commit

Permalink
Simplify some methods in DeviceFormat class.
Browse files Browse the repository at this point in the history
Signed-off-by: mulhern <amulhern@redhat.com>
  • Loading branch information
mulkieran committed Mar 11, 2015
1 parent 94b7623 commit e942590
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions blivet/formats/__init__.py
Expand Up @@ -204,10 +204,7 @@ def __repr__(self):

@property
def _existence_str(self):
exist = "existing"
if not self.exists:
exist = "non-existent"
return exist
return "existing" if self.exists else "non-existent"

@property
def desc(self):
Expand Down Expand Up @@ -322,11 +319,7 @@ def _getDevice(self):

@property
def name(self):
if self._name:
name = self._name
else:
name = self.type
return name
return self._name or self.type

@property
def type(self):
Expand Down

0 comments on commit e942590

Please sign in to comment.