From 2cb30b31117589791b845e58620cb6c3126a40a6 Mon Sep 17 00:00:00 2001 From: kyleknap Date: Fri, 13 Feb 2015 12:21:40 -0800 Subject: [PATCH] Shortened ``lineage_names`` code --- awscli/clidriver.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/awscli/clidriver.py b/awscli/clidriver.py index b6ad6dff2a426..3b449fd4f2887 100644 --- a/awscli/clidriver.py +++ b/awscli/clidriver.py @@ -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. @@ -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):