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
929
Manual.html
929
Manual.html
File diff suppressed because it is too large
Load Diff
17
Manual.org
17
Manual.org
@ -5035,12 +5035,17 @@ def parse_xrandr_verbose(iterator):
|
|||||||
def parse_edid_data(edid):
|
def parse_edid_data(edid):
|
||||||
vendor = "Unknown"
|
vendor = "Unknown"
|
||||||
model = "Unknown"
|
model = "Unknown"
|
||||||
data = subprocess.check_output("parse-edid < {}".format(edid), shell=True, universal_newlines=True)
|
try:
|
||||||
for line in data.splitlines():
|
data = subprocess.check_output("parse-edid < {}".format(edid),
|
||||||
if "VendorName" in line:
|
shell=True, universal_newlines=True)
|
||||||
vendor = line.strip().split('"')[1]
|
except subprocess.CalledProcessError:
|
||||||
if "ModelName" in line:
|
pass
|
||||||
model = line.strip().split('"')[1]
|
else:
|
||||||
|
for line in data.splitlines():
|
||||||
|
if "VendorName" in line:
|
||||||
|
vendor = line.strip().split('"')[1]
|
||||||
|
if "ModelName" in line:
|
||||||
|
model = line.strip().split('"')[1]
|
||||||
return vendor, model
|
return vendor, model
|
||||||
|
|
||||||
def collect_nvidia_data():
|
def collect_nvidia_data():
|
||||||
|
@ -174,12 +174,17 @@ def parse_xrandr_verbose(iterator):
|
|||||||
def parse_edid_data(edid):
|
def parse_edid_data(edid):
|
||||||
vendor = "Unknown"
|
vendor = "Unknown"
|
||||||
model = "Unknown"
|
model = "Unknown"
|
||||||
data = subprocess.check_output("parse-edid < {}".format(edid), shell=True, universal_newlines=True)
|
try:
|
||||||
for line in data.splitlines():
|
data = subprocess.check_output("parse-edid < {}".format(edid),
|
||||||
if "VendorName" in line:
|
shell=True, universal_newlines=True)
|
||||||
vendor = line.strip().split('"')[1]
|
except subprocess.CalledProcessError:
|
||||||
if "ModelName" in line:
|
pass
|
||||||
model = line.strip().split('"')[1]
|
else:
|
||||||
|
for line in data.splitlines():
|
||||||
|
if "VendorName" in line:
|
||||||
|
vendor = line.strip().split('"')[1]
|
||||||
|
if "ModelName" in line:
|
||||||
|
model = line.strip().split('"')[1]
|
||||||
return vendor, model
|
return vendor, model
|
||||||
|
|
||||||
def collect_nvidia_data():
|
def collect_nvidia_data():
|
||||||
|
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