Skip to content

Commit 89bf1ac

Browse files
committed
Fixed output parsing error messages
1 parent 68d0d42 commit 89bf1ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autorandr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def from_xrandr_output(cls, xrandr_output):
206206
remainder = xrandr_output[len(match_object.group(0)):]
207207
if remainder:
208208
raise RuntimeError(("Parsing XRandR output failed, %d bytes left unmatched after regular expression, "
209-
"starting at byte %d with ..'%s'.") % (len(remainder), len(len(match_object.group(0))), remainder[:10]))
209+
"starting at byte %d with ..'%s'.") % (len(remainder), len(match_object.group(0)), remainder[:10]))
210210

211211
match = match_object.groupdict()
212212

@@ -256,7 +256,7 @@ def from_xrandr_output(cls, xrandr_output):
256256
if not match["mode_width"]:
257257
# TODO We'd need to apply the reverse transformation here. Let's see if someone complains, I doubt that this
258258
# special case is actually required.
259-
print("Warning: Output %s has a transformation applied. Could not determine correct mode!", file=sys.stderr)
259+
print("Warning: Output %s has a transformation applied. Could not determine correct mode! Using `%s'." % (match["output"], options["mode"]), file=sys.stderr)
260260
if match["gamma"]:
261261
gamma = match["gamma"].strip()
262262
options["gamma"] = gamma

0 commit comments

Comments
 (0)