diff options
| author | Martin Jansa <Martin.Jansa@gmail.com> | 2014-12-18 13:13:05 +0100 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-12-19 20:10:59 +0100 |
| commit | 67c5f319b18a3728776dc1b8bb580d79164bdbd3 (patch) | |
| tree | 3b46f027d08085ade9d6c4ed65aa94c15bb33383 /meta-python/recipes-devtools/python/python-dbusmock/0002-Add-possibility-to-import-templates-from-packages.patch | |
| parent | d754cdd2832d74469d737832541e45fb9a3bb486 (diff) | |
| download | meta-openembedded-67c5f319b18a3728776dc1b8bb580d79164bdbd3.tar.gz | |
python-dbusmock: import from meta-webos-ports
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python-dbusmock/0002-Add-possibility-to-import-templates-from-packages.patch')
| -rw-r--r-- | meta-python/recipes-devtools/python/python-dbusmock/0002-Add-possibility-to-import-templates-from-packages.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python-dbusmock/0002-Add-possibility-to-import-templates-from-packages.patch b/meta-python/recipes-devtools/python/python-dbusmock/0002-Add-possibility-to-import-templates-from-packages.patch new file mode 100644 index 0000000000..981694f0e8 --- /dev/null +++ b/meta-python/recipes-devtools/python/python-dbusmock/0002-Add-possibility-to-import-templates-from-packages.patch | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | From ff1dffd5673bcd2cbd9554ad62476d108dbc18af Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Simon Busch <simon.busch@lge.com> | ||
| 3 | Date: Wed, 9 Apr 2014 13:20:33 +0200 | ||
| 4 | Subject: [PATCH 2/2] Add possibility to import templates from packages | ||
| 5 | |||
| 6 | Does not have any unit tests yet. | ||
| 7 | |||
| 8 | Signed-off-by: Simon Busch <simon.busch@lge.com> | ||
| 9 | --- | ||
| 10 | dbusmock/mockobject.py | 3 +++ | ||
| 11 | 1 file changed, 3 insertions(+) | ||
| 12 | |||
| 13 | diff --git a/dbusmock/mockobject.py b/dbusmock/mockobject.py | ||
| 14 | index a98e03d..9530c2a 100644 | ||
| 15 | --- a/dbusmock/mockobject.py | ||
| 16 | +++ b/dbusmock/mockobject.py | ||
| 17 | @@ -49,6 +49,9 @@ def load_module(name): | ||
| 18 | |||
| 19 | return module | ||
| 20 | |||
| 21 | + if '.' in name: | ||
| 22 | + return importlib.import_module(name) | ||
| 23 | + | ||
| 24 | return importlib.import_module('dbusmock.templates.' + name) | ||
| 25 | |||
| 26 | |||
| 27 | -- | ||
| 28 | 1.7.9.5 | ||
| 29 | |||
