Bug 145904
Summary: | Unjustified assumption in py config scripts | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Peter Trenholme <PTrenholme> |
Component: | system-config-printer | Assignee: | Tim Waugh <twaugh> |
Status: | CLOSED RAWHIDE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3 | CC: | bugzilla |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-03-30 15:13:47 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Peter Trenholme
2005-01-23 17:40:21 UTC
Well, it's not the case that "no printer is properly configured" is the trigger for this -- it's that cups is not installed properly. The *real* problem is that your spooler disappeared. :-) Any idea why that happened? No really. I'd been trying both Gnome annd KDE as desktops, and (I believe) KDE messes with the printer set-up. Since the "problem" I have upgraded CUPS at least once, and have had no further problem. But I don't know why the problem happened in the first place. (Printing had been working fine for several weeks [i.e., ever since I'd installed Fedora], and then just "stopped." That's why I was trying to bring up the printer configuration application to try to fix the problem. In fact, after I patched and ran the Python code, the problem was fixed.) In other words, I needed to run the code to configure things properly, but the code couldn't be run because thing weren't properly configured. This is refered to as "Catch 22." In any case, I would contend that "good programing practices" mandates that no assumption that a function call will not return a error code (when the function specified that it might do so) should be made. By checking that the list of spoolers was not empty, you would be able to pop a warning that CUPS was not properly configured rather than just failing to execute. And then the configuration could be fixed, as it was when I got the code to run. The cups_import which_spooler() function is no longer used, so this particular issue should no longer be a problem. *** Bug 155171 has been marked as a duplicate of this bug. *** |