Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
aymenbrahimdjelloul authored Jul 29, 2024
1 parent e193981 commit 433d075
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions BatteryPy/windows_batterypy.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import platform
import subprocess
import datetime
from exceptions import NotSupportedPlatform, NotSupportedDriver, NotSupportedDeviceType
from exceptions import NotSupportedDriver, NotSupportedDeviceType


class Battery:
Expand All @@ -36,9 +36,6 @@ def __init__(self):
# CHECK PLATFORM COMPATIBILITY
_platform = platform.system()

if _platform not in supported_platforms:
raise NotSupportedPlatform(_platform)

# CHECK IF THE 'powercfg' is enabled
_powercfg_output = subprocess.check_output(["powercfg", "/L"], text=True)

Expand Down Expand Up @@ -268,7 +265,7 @@ def get_all_info(self) -> dict:
""" This method will return all information that BatteryPy can retrieve"""

# DEFINE THE INFORMATION DICT
return {'python_version': platform.python_version(), 'BatteryPy_version': VERSION,
return {'python_version': platform.python_version(), 'BatteryPy_version': '1.0.1',
'battery_manufacturer': self.manufacturer, 'battery_chemistry': self.chemistry,
'battery_voltage': self.get_current_voltage(False),
'friendly_battery_voltage': self.get_current_voltage(True),
Expand Down

0 comments on commit 433d075

Please sign in to comment.