Skip to content

Commit

Permalink
fix: strip device model
Browse files Browse the repository at this point in the history
  • Loading branch information
vanutp committed Jun 1, 2023
1 parent 0ccf228 commit a775cc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tgpy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def create_client():
if sys.platform == 'linux':
if os.path.isfile('/sys/devices/virtual/dmi/id/product_name'):
with open('/sys/devices/virtual/dmi/id/product_name') as f:
device_model = f.read()
device_model = f.read().strip()
elif sys.platform == 'darwin':
device_model = (
subprocess.check_output('sysctl -n hw.model'.split(' ')).decode().strip()
Expand Down

0 comments on commit a775cc5

Please sign in to comment.