403Webshell
Server IP : 172.24.0.40  /  Your IP : 216.73.216.10
Web Server : Apache
System : Linux dbweb26.ust.edu.ph 4.18.0-513.5.1.el8_9.x86_64 #1 SMP Fri Sep 29 05:21:10 EDT 2023 x86_64
User : apache ( 48)
PHP Version : 8.2.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib64/python3.6/site-packages/subscription_manager/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib64/python3.6/site-packages/subscription_manager/rhelproduct.py
from __future__ import print_function, division, absolute_import

#
# Copyright (c) 2014 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
# along with this software; if not, see
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
#
# Red Hat trademarks are not licensed under GPLv2. No permission is
# granted to use or replicate Red Hat trademarks that are incorporated
# in this software or its documentation.
#
#
# RHEL product specific code
#

import re


# NOTE: This class compares a Product that could be from a ProductCertificate
#       or from an Entitlement. Product's from Entitlements may include a
#       brand_type attribute. A Product that represents a RHEL base os
#       may or may not be a RHEL "branded" Product. See rhelentbranding for
#       code that handles finding and comparing RHEL "branded" Product objects.
#
class RHELProductMatcher(object):
    """Check a Product object to see if it is a RHEL product.

    Compares the provided tags to see if any provide 'rhel-VERSION'.
    """
    def __init__(self, product=None):
        self.product = product
        # Match "rhel-6" or "rhel-11" or "rhel-alt-7" (bz1510024)
        # but not "rhel-6-server" or "rhel-6-server-highavailabilty"
        # NOTE: we considered rhel(-[\w\d]+)?-\d+$ but decided against it
        # due to possibility of unintentional matches
        self.pattern = "rhel(-alt)?-\d+$|rhel-5-workstation$"

    def is_rhel(self):
        """return true if this is a rhel product cert"""

        return any([re.match(self.pattern, tag)
                    for tag in self.product.provided_tags])

Youez - 2016 - github.com/yon3zu
LinuXploit