Changeset 1538 for pykota/trunk

Show
Ignore:
Timestamp:
06/11/04 10:16:03 (20 years ago)
Author:
jalet
Message:

More exceptions catched in case of very early failure.

Location:
pykota/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/FAQ

    r1500 r1538  
    1111    have to modify it. See the rest of this document to 
    1212    learn how to really diagnose what went wrong. 
     13     
     14  * How can I diagnose the problem when something goes wrong ? 
     15   
     16    Put "LogLevel debug2" in cupsd.conf (usually in /etc/cups/). 
     17    Then put "logger: stderr", "debug: yes" and  
     18    "crashrecipient: youremailaddress" in /etc/pykota/pykota.conf. 
     19    Finally restart CUPS. 
     20    CUPS' error_log file will now contain many informations which 
     21    will help diagnose your problem. You will receive failure 
     22    notices by email, and you can send all this to us for 
     23    diagnostic. 
    1324   
    1425  * Why doesn't CUPS under Debian Woody automatically 
     
    4859   
    4960    In PyKota, the term 'dumb printer' defines a printer which doesn't  
    50     understand PostScript AND doesn't have an internal page counter, AND  
    51     for which you don't know how to compute a job's size in number of  
    52     pages by analyzing its content. Any printer which is not a 
    53     'dumb printer' according to the above definition is supported  
    54     with PyKota. 
     61    understand PostScript or PCL5 AND doesn't have an internal page  
     62    counter, AND for which you don't know how to compute a job's size  
     63    in number of pages by analyzing its content. Any printer which  
     64    is not a 'dumb printer' according to the above definition is  
     65    supported by PyKota. 
    5566 
    5667  * How can I make PyKota work with my non-postscript printer under  
     
    8596    needs to be updated to new PyKota functionnalities, because it 
    8697    currently lacks. 
    87      
    88   * How can I diagnose the problem when something goes wrong ? 
    89    
    90     Put "LogLevel debug2" in cupsd.conf (usually in /etc/cups/). 
    91     Then put "logger: system" and "debug: yes" in  
    92     /etc/pykota/pykota.conf. 
    93     Finally restart CUPS. 
    94     CUPS' error_log file will now contain many informations which 
    95     will help diagnose your problem. Also your syslog's output for  
    96     the LPR facility (usually /var/log/lpr.log) will contain  
    97     PyKota's debug messages, notably all database related queries 
    98     and their result, be your database PostgreSQL or OpenLDAP. 
    99     With these two files the problem can usually be diagnosed within 
    100     minutes. Send them to the mailing list and wait for an answer. 
    10198     
    10299  * How can I share print quota between some printers only (not all) ?    
  • pykota/trunk/pykota/tool.py

    r1537 r1538  
    2222# 
    2323# $Log$ 
     24# Revision 1.100  2004/06/11 08:16:03  jalet 
     25# More exceptions catched in case of very early failure. 
     26# 
    2427# Revision 1.99  2004/06/11 07:07:38  jalet 
    2528# Now detects and logs configuration syntax errors instead of failing without 
     
    873876            self.username = self.username.lower() 
    874877        self.preserveinputfile = self.inputfile  
    875         self.accounter = accounter.openAccounter(self) 
     878        try : 
     879            self.accounter = accounter.openAccounter(self) 
     880        except accounter.PyKotaAccounterError, msg :     
     881            self.crashed(msg) 
     882            raise 
    876883        self.exportJobInfo() 
    877884        self.jobdatastream = self.openJobDataStream()