for paragraph in display_pci.split('\n\n'):
for line in paragraph.split('\n'):
if ':' not in line: continue
key, value = line.split(': ', 1)
value = value.strip()
key = key.strip()
The ValueError occurs on the line
key, value = line.split(': ', 1)
The problem is line.split returns ['\t\tDevCap:\tMaxPayload 128 bytes, PhantFunc 0, Latency L0s <4us, L1 unlimited']
Note :\t is not matched by the split on ': '
Fix:
--- /usr/share/apport/package-hooks/xserver-xorg-core.py.orig 2011-09-14 03:00:44.392362002 +0100
+++ /usr/share/apport/package-hooks/xserver-xorg-core.py 2011-09-14 03:01:52.102362002 +0100
@@ -338,7 +338,10 @@
for line in paragraph.split('\n'):
if ':' not in line: continue
- key, value = line.split(': ', 1)
+ m = re.match(r'(.*?):\s(.*)', line)
+ if not m:
+ continue
+ key, value = m.group(1), m.group(2)
value = value.strip()
key = key.strip()
if "VGA compatible controller" in key:
for paragraph in display_ pci.split( '\n\n') : split(' \n'):
continue
for line in paragraph.
if ':' not in line:
key, value = line.split(': ', 1)
value = value.strip()
key = key.strip()
The ValueError occurs on the line
key, value = line.split(': ', 1)
The problem is line.split returns ['\t\tDevCap: \tMaxPayload 128 bytes, PhantFunc 0, Latency L0s <4us, L1 unlimited']
Note :\t is not matched by the split on ': '
Fix:
--- /usr/share/ apport/ package- hooks/xserver- xorg-core. py.orig 2011-09-14 03:00:44.392362002 +0100 apport/ package- hooks/xserver- xorg-core. py 2011-09-14 03:01:52.102362002 +0100 split(' \n'):
continue r'(.*?) :\s(.*) ', line)
+++ /usr/share/
@@ -338,7 +338,10 @@
for line in paragraph.
if ':' not in line:
- key, value = line.split(': ', 1)
+ m = re.match(
+ if not m:
+ continue
+ key, value = m.group(1), m.group(2)
value = value.strip()
key = key.strip()
if "VGA compatible controller" in key: