SVN commit 619592 by sebas: Don't crash displayconfig-restore when screenwidth and height are bogus, use a sensible value of 96 instead. Thanks to Michael Blakeley for reporting.
CCMAIL:[EMAIL PROTECTED],[EMAIL PROTECTED] M +8 -2 displayconfig-restore.py --- trunk/playground/base/guidance/displayconfig/displayconfig-restore.py #619591:619592 @@ -81,8 +81,14 @@ xserver = xf86misc.XF86Server() if len(xserver.getScreens())!=0: (width,height,width_mm,height_mm) = xserver.getScreens()[0].getDimensions() - w_dpi = float(width)/(float(width_mm)/25.4) - h_dpi = float(height)/(float(height_mm)/25.4) + if not float(width_mm) == 0: + w_dpi = float(width)/(float(width_mm)/25.4) + else: + w_dpi = 96 + if not float(height_mm) == 0: + h_dpi = float(height)/(float(height_mm)/25.4) + else: + h_dpi = 96 dpi = (w_dpi+h_dpi)/2.0 # Average the two possible DPIs. if dpi >= 140: # Anything above 140 is ok. ** Changed in: kde-guidance (Ubuntu) Assignee: (unassigned) => sebas Status: Unconfirmed => Fix Committed -- displayconfig-restore.py can crash kde login with ZeroDivisionError https://launchpad.net/bugs/77844 -- kubuntu-bugs mailing list kubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs