def battery_status_read(self):
        """Get the battery status via proc/acpi."""
        try:
            path_info = self.readf("/proc/acpi/battery/BAT0/info")
            path_state = self.readf("/proc/acpi/battery/BAT0/state")
        except:
            return None
        try:
            max_cap = float(helpers.get_string_between("last full capacity:", "mWh", path_info))
            cur_cap = float(helpers.get_string_between("remaining capacity:", "mWh", path_state))
            return int(cur_cap / max_cap * 100)
        except:
            return None
dataset/ETHPy150Open richrd/suplemon/suplemon/modules/battery.py/Battery.battery_status_read/original