Show
Ignore:
Timestamp:
05/18/04 16:49:34 (20 years ago)
Author:
jalet
Message:

Big code changes to completely remove the need for "requester" directives,
jsut use "hardware(... your previous requester directive's content ...)"

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/accounters/software.py

    r1475 r1483  
    2222# 
    2323# $Log$ 
     24# Revision 1.2  2004/05/18 14:49:23  jalet 
     25# Big code changes to completely remove the need for "requester" directives, 
     26# jsut use "hardware(... your previous requester directive's content ...)" 
     27# 
    2428# Revision 1.1  2004/05/13 13:59:30  jalet 
    2529# Code simplifications 
     
    4549            infile = open(self.filter.inputfile, "rb") 
    4650             
    47         # launches external accounter 
     51        # launches software accounter 
    4852        # TODO : USE tempfile.mkstemp() instead ! Needs some work ! 
    4953        infilename = tempfile.mktemp() 
     
    6872            # check exit status 
    6973            if (os.WIFEXITED(retcode) and not os.WEXITSTATUS(retcode)) or os.stat(errfilename) : 
    70                 # tries to extract the job size from the external accounter's 
     74                # tries to extract the job size from the software accounter's 
    7175                # standard output 
    7276                childoutput = open(outfilename, "r") 
     
    7478                    pagecount = int(childoutput.readline().strip()) 
    7579                except (AttributeError, ValueError) : 
    76                     self.filter.logger.log_message(_("Unable to compute job size with external accounter %s") % self.arguments) 
     80                    self.filter.logger.log_message(_("Unable to compute job size with accounter %s") % self.arguments) 
    7781                    pagecount = 0 
    7882                childoutput.close()     
    7983            else : 
    80                 self.filter.logger.log_message(_("Unable to compute job size with external accounter %s") % self.arguments) 
     84                self.filter.logger.log_message(_("Unable to compute job size with accounter %s") % self.arguments) 
    8185                pagecount = 0 
    8286            os.remove(infilename) 
     
    8690            # TODO : temporary files may remain on the filesystem... 
    8791            msg = "%s : %s" % (self.arguments, msg)  
    88             self.filter.logger.log_message(_("Unable to compute job size with external accounter %s") % msg) 
     92            self.filter.logger.log_message(_("Unable to compute job size with accounter %s") % msg) 
    8993            pagecount = 0 
    9094