equal
deleted
inserted
replaced
|
1 # |
|
2 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 # All rights reserved. |
|
4 # This component and the accompanying materials are made available |
|
5 # under the terms of "Eclipse Public License v1.0" |
|
6 # which accompanies this distribution, and is available |
|
7 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 # |
|
9 # Initial Contributors: |
|
10 # Nokia Corporation - initial contribution. |
|
11 # |
|
12 # Contributors: |
|
13 # |
|
14 # Description: |
|
15 # |
|
16 |
|
17 import os |
|
18 import sys |
|
19 import fnmatch |
|
20 import re |
|
21 import logging |
|
22 |
|
23 |
|
24 def get_class(action_name): |
|
25 """ |
|
26 Try to get the SubAction class if it is available |
|
27 """ |
|
28 module = get_module(action_name) |
|
29 return module.get_class() |
|
30 |
|
31 def get_module(action_name): |
|
32 """ |
|
33 Try to get the SubAction class if it is available |
|
34 """ |
|
35 # trust that the scripts are all in scripts module |
|
36 _temp = __import__('cone.action', globals(), locals(), [action_name], -1) |
|
37 module = _temp.__getattribute__(action_name) |
|
38 return module |