with open("/sys/class/gpio/export", "w") as f_export:
f_export.write("{:d}\n".format(self.id))
except IOError as e:
with open("/sys/class/gpio/export", "w") as f_export:
f_export.write("{:d}\n".format(self.id))
except IOError as e:
with open(os.path.join(gpio_path, "direction"), "w") as f_direction:
f_direction.write(direction.lower() + "\n")
except IOError as e:
with open(os.path.join(gpio_path, "direction"), "w") as f_direction:
f_direction.write(direction.lower() + "\n")
except IOError as e:
label = f_label.read()
except (GPIOError, IOError) as e:
if isinstance(e, IOError):
label = f_label.read()
except (GPIOError, IOError) as e:
if isinstance(e, IOError):
with open(os.path.join(self._path, "direction"), "r") as f_direction:
direction = f_direction.read()
except IOError as e:
with open(os.path.join(self._path, "direction"), "r") as f_direction:
direction = f_direction.read()
except IOError as e:
with open(os.path.join(self._path, "direction"), "w") as f_direction:
f_direction.write(direction.lower() + "\n")
except IOError as e:
with open(os.path.join(self._path, "direction"), "w") as f_direction:
f_direction.write(direction.lower() + "\n")
except IOError as e: