Summary: | doesn't work - python backtrace | ||
---|---|---|---|
Product: | [Plasma] system-config-printer-kde | Reporter: | Sune Vuorela <debian> |
Component: | general | Assignee: | Jonathan Riddell <jr> |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | crash | CC: | cfeck, mydimle |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Sune Vuorela
2009-10-11 00:56:58 UTC
If I edit system-config-printer-kde.py and add a new line 1851, s-c-p-k seems to get quite a bit further. And I do see the Hello string. I guess the right fix should be trivial for anyone who knows s-c-p-k code and/or python. 1850 def show_HTTP_Error(self, status): 1851 msg = "Hello Riddell" 1852 if (status == cups.HTTP_UNAUTHORIZED or 1853 status == cups.HTTP_FORBIDDEN): 1854 1855 KMessageBox.error(self,i18n('The password may be incorrect, or the ' 1856 'server may be configured to deny ' 1857 'remote administration.'), 1858 i18n('Not authorized') ) 1859 else: 1860 if status == cups.HTTP_BAD_REQUEST: 1861 msg = i18nc("HTTP error", "Bad request") 1862 elif status == cups.HTTP_NOT_FOUND: 1863 msg = i18nc("HTTP error", "Not found") 1864 elif status == cups.HTTP_REQUEST_TIMEOUT: 1865 msg = i18nc("HTTP error", "Request timeout") 1866 elif status == cups.HTTP_UPGRADE_REQUIRED: 1867 msg = i18nc("HTTP error", "Upgrade required") 1868 elif status == cups.HTTP_SERVER_ERROR: 1869 msg = i18nc("HTTP error", "Server error") 1870 elif status == -1: 1871 msg = i18nc("HTTP error", "Not connected") 1872 else: 1873 msg = i18nc("HTTP error", "status %1", status) 1874 1875 KMessageBox.error(self, i18n("There was an HTTP error: %1.", msg), i18n('CUPS server error')) I can't confirm the error. Given the code that you pasted, msg is not defined in line 1875 if (status == cups.HTTP_UNAUTHORIZED or status == cups.HTTP_FORBIDDEN) because status is defined in the else block. Could you try putting four additional spaces before KMessageBox.error(...) in order to execute KMessageBox.error only in the else block? "system-config-printer-kde" is no longer maintained and has been replaced with "Print Manager" since KDE 4.10. The new version is a C++ rewrite of the old Python version, and may still lack some features or have some bugs. If this or another issue still needs to be addressed in KDE 4.10 or newer, please add a comment, or report it for "Print Manager". |