adafruit/adafruit-beaglebone-io-python — pull request #21 by cdesjardins (2013-08-08 11:08:01+00:00)
Title: Some gpios are more than 2 digits long, and they do not export/unexport properly the string buffer is only big enough for 2 digits and 1 null char

When attempting to use P9_31, which maps to gpio 110 I noticed it wasn't working, I poked around a bit and I found that when I ran GPIO.setup("P9_31", GPIO.OUT) I saw that the gpio that got exported was /sys/class/gpio/gpio11. I figured out that the buffers in gpio_export() and gpio_unexport() to store the gpio number in string form were not long enough to hold the 3 digit gpio with a NULL char, so I just made the buffer a bit bigger (with additional room for any future developments).

I have also added a test case for this scenario, but there is no py.test in the repo, so I do not see how the tests actually run...