adafruit / Adafruit_Python_GPIO

DEPRECATED! Please use Adafruit Blinka instead (was: Library to provide a cross-platform GPIO interface on the Raspberry Pi and Beaglebone Black using the RPi.GPIO and Adafruit_BBIO libraries.)
MIT License
402 stars 312 forks source link

Platform.pi_version() regex fails #72

Closed elevenchars closed 6 years ago

elevenchars commented 7 years ago

2.7.9

whenever i run Platform.pi_version(), it returns None, which led me to think that the regex was not parsing the info from /proc/cpuinfo properly. i was able to get it to grab the hardware group properly by changing the regex to this: Hardware\\t+:\s+(\w+) When re.match parses cpuinfo it reads in the escaped characters. I am sure there is a more elegant solution but I am not familiar enough with python to parse cpuinfo with the characters unescaped.

run Platform.pi_version()

tdicola commented 6 years ago

This was fixed last year with a few other changes--trying the platform pi_version function now returns the correct version. Thanks for raising the issue!