ok
Direktori : /lib/python3.6/site-packages/dnf/yum/__pycache__/ |
Current File : //lib/python3.6/site-packages/dnf/yum/__pycache__/misc.cpython-36.pyc |
3 �ft`W. � @ sZ d Z ddlmZmZ ddlmZ ddlmZmZmZ ddl T ddl ZddlZ ddlZ ddlZ ddlZ ddlZddlZddlZddlZddlZddlZddlZddlZddlZdgZdadd � Zdad d� Zdd � ZG dd� de �Z!dd� Z"dd� Z#d,dd�Z$dd� Z%dd� Z&dd� Z'd-dd�Z(d d!� Z)da*d"d#� Z+d.d$d%�Z,d&d'� Z-d(d)� Z.d/d*d+�Z/dS )0z% Assorted utility functions for yum. � )�print_function�absolute_import)�unicode_literals)�base64_decodebytes� basestring�unicode)�*NZsha256c C s t dkrtjd�ja t | �S )z( Tests if a string is a shell wildcard. Nz[*?]|\[.+\])�_re_compiled_glob_match�re�compile�search)�s� r �/usr/lib/python3.6/misc.py�re_glob. s r c C sF t dkr(tjd�j}tjd�j}||fa xt D ]}|| �r.dS q.W dS )zC Tests if a string needs a full nevra match, instead of just name. Nz.*([-.*?]|\[.+\]).z[0-9]+:TF)�_re_compiled_full_matchr r �match)r ZoneZtwoZrecr r r �re_full_search_needed6 s r c C s t d S )Nr )�_default_checksumsr r r r �get_default_chksum_typeD s r c @ s: e Zd ZdZd dd�Zdd� Zdd� Zd d � Zdd� ZdS )� GenericHolderz�Generic Holder class used to hold other objects of known types It exists purely to be able to do object.somestuff, object.someotherstuff or object[key] and pass object to another function that will understand itNc C s || _ d S )N)�_GenericHolder__iter)�self�iterr r r �__init__M s zGenericHolder.__init__c C s | j d k rt| | j �S d S )N)r r )r r r r �__iter__P s zGenericHolder.__iter__c C s t | |�rt| |�S t|��d S )N)�hasattr�getattr�KeyError)r �itemr r r �__getitem__T s zGenericHolder.__getitem__c C s dd� t | �j� D �S )z!Return a dictionary of all lists.c S s"