BotaxWebshell
Server IP : 68.178.172.28  /  Your IP : 216.73.216.32
Web Server : Apache
System : Linux 28.172.178.68.host.secureserver.net 4.18.0-553.89.1.el8_10.x86_64 #1 SMP Mon Dec 8 03:53:08 EST 2025 x86_64
User : kiskarnal ( 1003)
PHP Version : 8.0.30
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : ON |  Pkexec : ON
Directory :  /var/opt/nydus/ops/asn1crypto/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /var/opt/nydus/ops/asn1crypto/_errors.py
# coding: utf-8

"""
Exports the following items:

 - unwrap()
 - APIException()
"""

from __future__ import unicode_literals, division, absolute_import, print_function

import re
import textwrap


class APIException(Exception):
    """
    An exception indicating an API has been removed from asn1crypto
    """

    pass


def unwrap(string, *params):
    """
    Takes a multi-line string and does the following:

     - dedents
     - converts newlines with text before and after into a single line
     - strips leading and trailing whitespace

    :param string:
        The string to format

    :param *params:
        Params to interpolate into the string

    :return:
        The formatted string
    """

    output = textwrap.dedent(string)

    # Unwrap lines, taking into account bulleted lists, ordered lists and
    # underlines consisting of = signs
    if output.find('\n') != -1:
        output = re.sub('(?<=\\S)\n(?=[^ \n\t\\d\\*\\-=])', ' ', output)

    if params:
        output = output % params

    output = output.strip()

    return output

Youez - 2016 - github.com/yon3zu
LinuXploit