'Returns true if the agent should upgrade itself.'

def _shouldUpgradeAgent(self, localVersion, remoteVersion):

    try:
        for (l, r) in zip(localVersion.split('.'), remoteVersion.split('.')):
            if (int(l) < int(r)):
                return True
            if (int(l) > int(r)):
                return False
    except StandardError:
        self.logger.error(("Upgrade    problem    with    versions    -    local:    '%s'    -    remote:    '%s'" % (localVersion, remoteVersion)))
    return False
