/usr/lib/python3.9/site-packages/dnf/yum/__pycache__
Edit: /usr/lib/python3.9/site-packages/dnf/yum/__pycache__/misc.cpython-39.pyc (9535B)
a
©!có+ ã @ sJ 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&d'„Z-dS ),z%
Assorted utility functions for yum.
é )Úprint_functionÚabsolute_import)Úunicode_literals)Úbase64_decodebytesÚ
basestringÚunicode)Ú*NZsha256c C s t du rt d¡ja t | ƒS )z( Tests if a string is a shell wildcard. Nz[*?]|\[.+\])Ú_re_compiled_glob_matchÚreÚcompileÚsearch)Ús© r ú0/usr/lib/python3.9/site-packages/dnf/yum/misc.pyÚre_glob. s r c C sD t du r(t d¡j}t d¡j}||fa t D ]}|| ƒr, dS q,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 urt| | j ƒS d S r )r r ©r r r r Ú__iter__P s
zGenericHolder.__iter__c C s t | |ƒrt| |ƒS t|ƒ‚d S r )ÚhasattrÚgetattrÚKeyError)r Úitemr r r Ú__getitem__T s
zGenericHolder.__getitem__c C s dd„ t | ƒ ¡ D ƒS )z!Return a dictionary of all lists.c S s" i | ]\}}t |ƒtu r||“qS r )ÚtypeÚlist)Ú.0ÚkeyZlist_r r r Ú
\ s ÿz+GenericHolder.all_lists..)ÚvarsÚitemsr r r r Ú all_listsZ s zGenericHolder.all_listsc C s0 | ¡ ¡ D ]\}}t| ƒ |g ¡ |¡ q| S )z7 Concatenate the list attributes from 'other' to ours. )r* r) r( Ú
setdefaultÚextend)r Úotherr&