Skip to content

Commit

Permalink
Shortened lineage_names code
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleknap committed Feb 13, 2015
1 parent 2ce9f3b commit 2cb30b3
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions awscli/clidriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,7 @@ def lineage(self):
@property
def lineage_names(self):
# Represents the lineage of a command in terms of command ``name``
lineage_names = []
for cmd in self.lineage:
lineage_names.append(cmd.name)
return lineage_names
return [cmd.name for cmd in self.lineage]

def __call__(self, args, parsed_globals):
"""Invoke CLI operation.
Expand Down Expand Up @@ -485,10 +482,7 @@ def lineage(self, value):
@property
def lineage_names(self):
# Represents the lineage of a command in terms of command ``name``
lineage_names = []
for cmd in self.lineage:
lineage_names.append(cmd.name)
return lineage_names
return [cmd.name for cmd in self.lineage]

@property
def arg_table(self):
Expand Down

0 comments on commit 2cb30b3

Please sign in to comment.