You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by wf...@apache.org on 2014/12/08 18:59:23 UTC

incubator-aurora git commit: Use abstract decorators in CommandLine class. This ensures the name property and register_nouns method are implemented.

Repository: incubator-aurora
Updated Branches:
  refs/heads/master f30c50937 -> a9e12171c


Use abstract decorators in CommandLine class.
This ensures the name property and register_nouns method are implemented.

Reviewed at https://reviews.apache.org/r/28696/


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/a9e12171
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/a9e12171
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/a9e12171

Branch: refs/heads/master
Commit: a9e12171cc8ef24d9cf0d770f4bddd9f5fc1822d
Parents: f30c509
Author: Zameer Manji <zm...@twopensource.com>
Authored: Mon Dec 8 09:59:32 2014 -0800
Committer: Bill Farner <wf...@apache.org>
Committed: Mon Dec 8 09:59:32 2014 -0800

----------------------------------------------------------------------
 src/main/python/apache/aurora/client/cli/__init__.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/a9e12171/src/main/python/apache/aurora/client/cli/__init__.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/cli/__init__.py b/src/main/python/apache/aurora/client/cli/__init__.py
index a133ac0..e3ed31e 100644
--- a/src/main/python/apache/aurora/client/cli/__init__.py
+++ b/src/main/python/apache/aurora/client/cli/__init__.py
@@ -227,10 +227,10 @@ class AuroraCommand(AbstractClass):
     """Returns the command name"""
 
 
-class CommandLine(object):
+class CommandLine(AbstractClass):
   """The top-level object implementing a command-line application."""
 
-  @property
+  @abstractproperty
   def name(self):
     """Returns the name of this command-line tool"""
 
@@ -312,6 +312,7 @@ class CommandLine(object):
     result.append("\nRun 'help noun' or 'help noun verb' for help about a specific command")
     return "\n".join(result)
 
+  @abstractmethod
   def register_nouns(self):
     """This method should overridden by applications to register the collection of nouns
     that they can manipulate.