This commit is contained in:
xyj 2023-12-09 15:25:38 +08:00
parent 885c4290c1
commit 89229c989e
1 changed files with 3 additions and 5 deletions

View File

@ -1,7 +1,5 @@
import os
import subprocess import subprocess
# p = subprocess.Popen(['cat /home/pi/device_name'], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) p = subprocess.Popen(['cat /home/pi/device_name'], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# out, err = p.communicate() out, err = p.communicate()
# device_name = out.decode('utf-8').strip() device_name = out.decode('utf-8').strip()
device_name = os.getenv('device_name').strip()