diff options
| author | Trevor Gamblin <trevor.gamblin@windriver.com> | 2020-05-12 17:51:31 -0400 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2020-05-12 15:58:06 -0700 |
| commit | 0acb9d90bcd2dadce2102fc3b98635b942e2042b (patch) | |
| tree | c84938ff57610d80ee683f7238517091d632d889 /meta-python/recipes-devtools/python/python-dbusmock/0001-Add-functionality-to-add-own-objects-to-internal-obj.patch | |
| parent | b80664c82b6c7c459c23b26dadbefe50c2ee779a (diff) | |
| download | meta-openembedded-0acb9d90bcd2dadce2102fc3b98635b942e2042b.tar.gz | |
python3-dbusmock: re-add recipe and fix patch path
Running the "non-gpl3" builder in my local autobuilder fails
almost immediately because python3-dbusmock is not available. It
appears that during the creation of meta-python2 and cleanup of
meta-python that the recipe for python3-dbusmock got removed
entirely, so I've re-added it, and renamed the corresponding
patch folder so that it can find the patches listed in the
recipe.
Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python-dbusmock/0001-Add-functionality-to-add-own-objects-to-internal-obj.patch')
| -rw-r--r-- | meta-python/recipes-devtools/python/python-dbusmock/0001-Add-functionality-to-add-own-objects-to-internal-obj.patch | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/meta-python/recipes-devtools/python/python-dbusmock/0001-Add-functionality-to-add-own-objects-to-internal-obj.patch b/meta-python/recipes-devtools/python/python-dbusmock/0001-Add-functionality-to-add-own-objects-to-internal-obj.patch deleted file mode 100644 index c4d817849f..0000000000 --- a/meta-python/recipes-devtools/python/python-dbusmock/0001-Add-functionality-to-add-own-objects-to-internal-obj.patch +++ /dev/null | |||
| @@ -1,52 +0,0 @@ | |||
| 1 | From c4436fd42f2936e5fb0f95434d06e45aa9959ca0 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Simon Busch <simon.busch@lge.com> | ||
| 3 | Date: Wed, 9 Apr 2014 13:18:33 +0200 | ||
| 4 | Subject: [PATCH] Add functionality to add own objects to internal object | ||
| 5 | |||
| 6 | list | ||
| 7 | |||
| 8 | In some case the tests might want to create dynamically dbus objects which extended | ||
| 9 | functionality from own class definitions within templates. In such cases we need to | ||
| 10 | register those objects with the internal object manager of dbusmock. | ||
| 11 | |||
| 12 | Signed-off-by: Simon Busch <simon.busch@lge.com> | ||
| 13 | |||
| 14 | --- | ||
| 15 | dbusmock/__init__.py | 4 ++-- | ||
| 16 | dbusmock/mockobject.py | 8 ++++++++ | ||
| 17 | 2 files changed, 10 insertions(+), 2 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/dbusmock/__init__.py b/dbusmock/__init__.py | ||
| 20 | index 8a482ab..3d5d71a 100644 | ||
| 21 | --- a/dbusmock/__init__.py | ||
| 22 | +++ b/dbusmock/__init__.py | ||
| 23 | @@ -14,8 +14,8 @@ __license__ = 'LGPL 3+' | ||
| 24 | __version__ = '0.16.7' | ||
| 25 | |||
| 26 | from dbusmock.mockobject import (DBusMockObject, MOCK_IFACE, | ||
| 27 | - OBJECT_MANAGER_IFACE, get_object, get_objects) | ||
| 28 | + OBJECT_MANAGER_IFACE, get_object, get_objects, add_object) | ||
| 29 | from dbusmock.testcase import DBusTestCase | ||
| 30 | |||
| 31 | __all__ = ['DBusMockObject', 'MOCK_IFACE', 'OBJECT_MANAGER_IFACE', | ||
| 32 | - 'DBusTestCase', 'get_object', 'get_objects'] | ||
| 33 | + 'DBusTestCase', 'get_object', 'get_objects', 'add_object'] | ||
| 34 | diff --git a/dbusmock/mockobject.py b/dbusmock/mockobject.py | ||
| 35 | index 586dbad..e4f130f 100644 | ||
| 36 | --- a/dbusmock/mockobject.py | ||
| 37 | +++ b/dbusmock/mockobject.py | ||
| 38 | @@ -688,6 +688,14 @@ dbus.service._method_lookup = _dbusmock_method_lookup | ||
| 39 | # Helper API for templates | ||
| 40 | # | ||
| 41 | |||
| 42 | +def add_object(path, obj): | ||
| 43 | + if path in objects: | ||
| 44 | + raise dbus.exceptions.DBusException( | ||
| 45 | + 'org.freedesktop.DBus.Mock.NameError', | ||
| 46 | + 'object %s already exists' % path) | ||
| 47 | + | ||
| 48 | + objects[path] = obj | ||
| 49 | + | ||
| 50 | |||
| 51 | def get_objects(): | ||
| 52 | '''Return all existing object paths''' | ||
