Fix bug in test for on linux. Import of os within the function was masking the global import, so that os.path.join on line 17 was treated as an undeclared variable and iStream.py was then crashing. Removing the second import fixed the problem. NB: this code isn't in master yet.
Also tidied up a bit of formatting.
Error message was only visible onscreen and was:
File "/home/pi/source/RMS/iStream/iStream.py", line 17, in rmsExternal
lockfile = os.path.join(config.data_dir, config.reboot_lock_file)
UnboundLocalError: local variable 'os' referenced before assignment
Fix bug in test for on linux. Import of os within the function was masking the global import, so that os.path.join on line 17 was treated as an undeclared variable and iStream.py was then crashing. Removing the second import fixed the problem. NB: this code isn't in master yet. Also tidied up a bit of formatting.
Error message was only visible onscreen and was: File "/home/pi/source/RMS/iStream/iStream.py", line 17, in rmsExternal lockfile = os.path.join(config.data_dir, config.reboot_lock_file) UnboundLocalError: local variable 'os' referenced before assignment