-migration to CdistType error
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
parent
0851af7d52
commit
f12a83f3dd
3 changed files with 6 additions and 3 deletions
|
@ -3,6 +3,9 @@
|
||||||
- double check verification
|
- double check verification
|
||||||
- adjust tests
|
- adjust tests
|
||||||
|
|
||||||
|
- remove useless
|
||||||
|
ERROR: monitoring02: Code that raised the error:
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
- __user
|
- __user
|
||||||
|
|
|
@ -96,13 +96,13 @@ class Code(object):
|
||||||
self.env.update({'__debug': "yes" })
|
self.env.update({'__debug': "yes" })
|
||||||
|
|
||||||
def _run_gencode(self, cdist_object, which):
|
def _run_gencode(self, cdist_object, which):
|
||||||
cdist_type = cdist_object.type
|
cdist_type = cdist_object.cdist_type
|
||||||
script = os.path.join(self.local.type_path, getattr(cdist_type, 'gencode_%s_path' % which))
|
script = os.path.join(self.local.type_path, getattr(cdist_type, 'gencode_%s_path' % which))
|
||||||
if os.path.isfile(script):
|
if os.path.isfile(script):
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
env.update(self.env)
|
env.update(self.env)
|
||||||
env.update({
|
env.update({
|
||||||
'__type': cdist_object.type.absolute_path,
|
'__type': cdist_object.cdist_type.absolute_path,
|
||||||
'__object': cdist_object.absolute_path,
|
'__object': cdist_object.absolute_path,
|
||||||
'__object_id': cdist_object.object_id,
|
'__object_id': cdist_object.object_id,
|
||||||
'__object_name': cdist_object.name,
|
'__object_name': cdist_object.name,
|
||||||
|
|
|
@ -198,5 +198,5 @@ class ObjectTestCase(test.CdistTestCase):
|
||||||
other_name = '__first/man'
|
other_name = '__first/man'
|
||||||
other_object = self.cdist_object.object_from_name(other_name)
|
other_object = self.cdist_object.object_from_name(other_name)
|
||||||
self.assertTrue(isinstance(other_object, core.CdistObject))
|
self.assertTrue(isinstance(other_object, core.CdistObject))
|
||||||
self.assertEqual(other_object.type.name, '__first')
|
self.assertEqual(other_object.cdist_type.name, '__first')
|
||||||
self.assertEqual(other_object.object_id, 'man')
|
self.assertEqual(other_object.object_id, 'man')
|
||||||
|
|
Loading…
Reference in a new issue