Next / Previous / Contents / TCC Help System / NM Tech homepage

47. HitCount.addHit(): Tally one access

This method always increments the .nTotal attribute. If the URL is considered off-campus, it also increments the .nFar attribute.

webstats.py
# - - -   H i t C o u n t . a d d H i t

    def addHit ( self, isFar ):
        '''Add one hit from the given accessor URL.
        '''
        #-- 1 --
        self.nTotal  +=  1

        #-- 2 --
        if isFar:
            self.nFar  +=  1