Skip to content
This repository was archived by the owner on Sep 30, 2019. It is now read-only.

Commit dcdf691

Browse files
committed
Fix missed usage with platform_detect rename.
1 parent 9d66b78 commit dcdf691

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Adafruit_GPIO/GPIO.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2020
# THE SOFTWARE.
2121

22-
import Adafruit_GPIO.platform_detect as pd
22+
import Adafruit_GPIO.Platform as Platform
2323

2424

2525
OUT = 0
@@ -135,12 +135,12 @@ def get_platform_gpio(**keywords):
135135
exception if a GPIO instance can't be created for the current platform. The
136136
returned GPIO object is an instance of BaseGPIO.
137137
"""
138-
plat = pd.platform_detect()
139-
if plat == pd.RASPBERRY_PI:
138+
plat = Platform.platform_detect()
139+
if plat == Platform.RASPBERRY_PI:
140140
import RPi.GPIO
141141
return RPiGPIOAdapter(RPi.GPIO, **keywords)
142-
elif plat == pd.BEAGLEBONE_BLACK:
142+
elif plat == Platform.BEAGLEBONE_BLACK:
143143
import Adafruit_BBIO.GPIO
144144
return AdafruitBBIOAdapter(Adafruit_BBIO.GPIO, **keywords)
145-
elif plat == pd.UNKNOWN:
145+
elif plat == Platform.UNKNOWN:
146146
raise RuntimeError('Could not determine platform.')

0 commit comments

Comments
 (0)