Add error handling for parse-edid call.
If parse-edid can not parse the given edid, use "Unknown" for vendor and model name.
This commit is contained in:
parent
6724ddcc23
commit
70945dc97b
919
Manual.html
919
Manual.html
File diff suppressed because it is too large
Load Diff
@ -5035,7 +5035,12 @@ def parse_xrandr_verbose(iterator):
|
||||
def parse_edid_data(edid):
|
||||
vendor = "Unknown"
|
||||
model = "Unknown"
|
||||
data = subprocess.check_output("parse-edid < {}".format(edid), shell=True, universal_newlines=True)
|
||||
try:
|
||||
data = subprocess.check_output("parse-edid < {}".format(edid),
|
||||
shell=True, universal_newlines=True)
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
else:
|
||||
for line in data.splitlines():
|
||||
if "VendorName" in line:
|
||||
vendor = line.strip().split('"')[1]
|
||||
|
@ -174,7 +174,12 @@ def parse_xrandr_verbose(iterator):
|
||||
def parse_edid_data(edid):
|
||||
vendor = "Unknown"
|
||||
model = "Unknown"
|
||||
data = subprocess.check_output("parse-edid < {}".format(edid), shell=True, universal_newlines=True)
|
||||
try:
|
||||
data = subprocess.check_output("parse-edid < {}".format(edid),
|
||||
shell=True, universal_newlines=True)
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
else:
|
||||
for line in data.splitlines():
|
||||
if "VendorName" in line:
|
||||
vendor = line.strip().split('"')[1]
|
||||
|
1
roles/yavdr-remote/defaults/main.yml
Normal file
1
roles/yavdr-remote/defaults/main.yml
Normal file
@ -0,0 +1 @@
|
||||
lircd0_socket: /var/run/lirc/lircd0
|
Loading…
Reference in New Issue
Block a user