You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by da...@apache.org on 2016/10/20 09:54:49 UTC
incubator-ariatosca git commit: pylint workflow exceptions and remove
everything from workflows/__init__.pyh
Repository: incubator-ariatosca
Updated Branches:
refs/heads/pylint-wfexcandinit [created] 652bdb16a
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/652bdb16
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/652bdb16
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/652bdb16
Branch: refs/heads/pylint-wfexcandinit
Commit: 652bdb16a1b44ac0aaaaae68dd62c9429a5c2d87
Parents: 2e14ee4
Author: Dan Kilman <da...@gmail.com>
Authored: Thu Oct 20 12:54:33 2016 +0300
Committer: Dan Kilman <da...@gmail.com>
Committed: Thu Oct 20 12:54:33 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/652bdb16/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/652bdb16/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
+ """