openaps icon indicating copy to clipboard operation
openaps copied to clipboard

Medtronic session file read always fails due to 'a+' mode

Open wkcwells opened this issue 9 years ago • 1 comments

In this line:

https://github.com/openaps/openaps/blob/dev/openaps/vendors/medtronic.py#L81

I believe that the 'a+' file mode is causing the stream to be positioned a the end of the file, and therefore nothing is ever read.

wkcwells avatar Jul 27 '16 22:07 wkcwells

Looks like this is not an issue on Edison/Ubilinux running python 2.7.3.
But it is an issue on a Mac OSX 10.11.5 running python 2.7.7. The 'a+' file mode appears to behave differently on the two systems. 'r' appears to work fine on both of them.

wkcwells avatar Jul 28 '16 18:07 wkcwells