Show
Ignore:
Timestamp:
05/26/04 18:44:48 (20 years ago)
Author:
jalet
Message:

Now logs something when client hostname can't be extracted

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/cupspykota

    r1502 r1503  
    2424# 
    2525# $Log$ 
     26# Revision 1.54  2004/05/26 16:44:48  jalet 
     27# Now logs something when client hostname can't be extracted 
     28# 
    2629# Revision 1.53  2004/05/26 14:49:35  jalet 
    2730# First try at saving the job-originating-hostname in the database 
     
    263266            conffile = open(cupsdconf, "r") 
    264267        except IOError :     
     268            self.logdebug("Unable to open %s" % cupsdconf) 
    265269            return # file doesn't exist or can't be read 
    266270        else :     
     
    281285            pagelog = open(pagelogpath, "r") 
    282286        except IOError :     
     287            self.logdebug("Unable to open %s" % pagelogpath) 
    283288            return # no page log or can't read it, originating hostname unknown yet 
    284289        else :     
     
    297302            pagelog.close()         
    298303            if matchingline is None : 
     304                self.logdebug("No matching line found in page_log") 
    299305                return # correct line not found, job-originating-hostname unknown 
    300306            else :     
     
    314320            # tries to extract job-originating-hostname  
    315321            clienthost = self.getJobOriginatingHostname(printer.Name, user.Name, self.jobid) 
     322            self.logdebug("Client Hostname : %s" % (clienthost or "Unknown"))     
    316323            os.putenv("PYKOTAJOBORIGINATINGHOSTNAME", str(clienthost or "")) 
    317324