def info(self):
        '''Returns the number of completed Adobe payloads,
        and the AdobeCode of the most recently completed payload.'''
        last_adobecode = ""

        logfile = self.get_current_log()
        if logfile:
            if self.kind in ['CS6', 'CS5']:
                regex = r'END TIMER :: \[Payload Operation :\{'
            elif self.kind in ['CS3', 'CS4']:
                if self.operation == 'install':
                    regex = r'Closed PCD cache session payload with ID'
                else:
                    regex = r'Closed CAPS session for removal of payload'
            else:
                if self.operation == 'install':
                    regex = r'Completing installation for payload at '
                else:
                    regex = r'Physical payload uninstall result '

            cmd = ['/usr/bin/grep', '-E', regex, logfile]
            proc = subprocess.Popen(cmd, bufsize=-1,
                                    stdout=subprocess.PIPE,
                                    stderr=subprocess.PIPE)
            (output, dummy_err) = proc.communicate()
            if output:
                lines = str(output).splitlines()
                completed_payloads = len(lines)

                if (not logfile in self.payload_count
                        or completed_payloads > self.payload_count[logfile]):
                    # record number of completed payloads
                    self.payload_count[logfile] = completed_payloads

                    # now try to get the AdobeCode of the most recently
                    # completed payload.
                    # this isn't 100% accurate, but it's mostly for show
                    # anyway...
                    regex = re.compile(r'[^{]*(\{[A-Fa-f0-9-]+\})')
                    lines.reverse()
                    for line in lines:
                        m = regex.match(line)
                        try:
                            last_adobecode = m.group(1)
                            break
                        except (IndexError, __HOLE__):
                            pass

        total_completed_payloads = 0
        for key in self.payload_count.keys():
            total_completed_payloads += self.payload_count[key]

        return (total_completed_payloads, last_adobecode)


# dmg helper
# we need this instead of the one in munkicommon because the Adobe stuff
# needs the dmgs mounted under /Volumes.  We can merge this later (or not).
dataset/ETHPy150Open munki/munki/code/client/munkilib/adobeutils.py/AdobeInstallProgressMonitor.info