ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dankil...@apache.org
Subject [1/3] incubator-ariatosca git commit: pylint workflow exceptions and remove everything from workflows/__init__.pyh
Date Thu, 20 Oct 2016 13:11:35 GMT
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/wf-wip fdfb49090 -> 62cf248b9


pylint workflow exceptions and remove everything from workflows/__init__.pyh


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

Branch: refs/heads/wf-wip
Commit: 51b1b84f1d21a8bca807a7815e6d27bf7aa01223
Parents: fdfb490
Author: Dan Kilman <dankilman@gmail.com>
Authored: Thu Oct 20 12:54:33 2016 +0300
Committer: Dan Kilman <dankilman@gmail.com>
Committed: Thu Oct 20 16:11:08 2016 +0300

----------------------------------------------------------------------
 aria/workflows/__init__.py   | 40 ---------------------------------------
 aria/workflows/exceptions.py | 18 +++++++++++++++++-
 2 files changed, 17 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/51b1b84f/aria/workflows/__init__.py
----------------------------------------------------------------------
diff --git a/aria/workflows/__init__.py b/aria/workflows/__init__.py
index c0e9e5a..ae1e83e 100644
--- a/aria/workflows/__init__.py
+++ b/aria/workflows/__init__.py
@@ -12,43 +12,3 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-
-"""
-Aria's Executors Package
-Path: aria.executors
-
-API:
-    - executors - set of every executor that bin register
-    - executor - executor that bin register, and have the highest priority
-    - ExecutorInformation - tool to register executor
-    - Process - subprocess wrapper tool
-    -
-
-Plugins:
-...
-"""
-
-import os
-
-from ..tools.plugin import plugin_installer
-
-__all__ = (
-    'executors',
-    'Process',
-)
-
-
-executors = {}
-
-
-def executor_register_callback(module):
-    global executors
-    register_executor_func = getattr(module, 'register_executor', None)
-    for executor in register_executor_func():
-        executors[executor.__name__] = executor
-
-plugin_installer(
-    path=os.path.dirname(os.path.realpath(__file__)),
-    plugin_suffix='_executor',
-    callback=executor_register_callback,
-    package=__package__)

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/51b1b84f/aria/workflows/exceptions.py
----------------------------------------------------------------------
diff --git a/aria/workflows/exceptions.py b/aria/workflows/exceptions.py
index a815976..b8ebc14 100644
--- a/aria/workflows/exceptions.py
+++ b/aria/workflows/exceptions.py
@@ -13,12 +13,23 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+"""
+Workflow related Exception classes
+"""
+
 
 class ExecutorException(Exception):
+    """
+    General executor exception
+    """
     pass
 
 
 class ProcessException(ExecutorException):
+    """
+    Raised when subprocess execution fails
+    """
+
     def __init__(self, command, stderr=None, stdout=None, return_code=None):
         """
         Process class Exception
@@ -36,6 +47,9 @@ class ProcessException(ExecutorException):
 
     @property
     def explanation(self):
+        """
+        Describes the error in detail
+        """
         return (
             'Command "{error.command}" executed with an error.\n'
             'code: {error.return_code}\n'
@@ -44,4 +58,6 @@ class ProcessException(ExecutorException):
 
 
 class AriaEngineError(Exception):
-    pass
+    """
+    Raised by the workflow engine
+    """


Mime
View raw message