CroatianMeteorNetwork / RMS

RPi Meteor Station
https://globalmeteornetwork.org/
GNU General Public License v3.0
176 stars 49 forks source link

istream crashing in test for whether on Linux or Pi. #142

Closed markmac99 closed 1 year ago

markmac99 commented 1 year ago

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