Message12081
Hi, you are right - I did mess up the capitalization in my example.
However - if you look in the attached automation.zip you'll see that I have it correct there. Should have copy-pasted. Sorry! :S
Correct should be the following:
Folder TestModule
__init__.py:
import test_file
test_file.py:
import TestModule
print( 'TESTPROP: {}'.format(hasattr(testModule, 'TESTPROP')))
testModule.TESTPROP = 'TEST'
print( 'TESTPROP: {}'.format(hasattr(testModule, 'TESTPROP')))
ModuleA.py:
import TestModule
ModuleB.py:
import ModuleA
import TestModule
Upon execution of ModuleB I then would expect the output to be (behavior of)
TESTPROP: 0
TESTPROP: 1
In my openhab instance it gives me with 2.7.1 this:
TESTPROP: 0
TESTPROP: 1
TESTPROP: 0
TESTPROP: 1 |
|
Date |
User |
Action |
Args |
2018-08-11 12:29:14 | spaceman_spiff | set | messageid: <1533990554.1.0.56676864532.issue2700@psf.upfronthosting.co.za> |
2018-08-11 12:29:14 | spaceman_spiff | set | recipients:
+ spaceman_spiff, jeff.allen, stefan.richthofer |
2018-08-11 12:29:13 | spaceman_spiff | link | issue2700 messages |
2018-08-11 12:29:13 | spaceman_spiff | create | |
|