File: //usr/share/virt-manager/virtinst/__pycache__/diskbackend.cpython-39.pyc
a
�hA^ � @ sF d dl Z d dlZd dlZd dlZd dlZddlmZ ddlmZm Z ddl
mZ dd� Zdd � Z
d
d� Zdd
� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zd Zd!d"� Zd#d$� Zd%d&� Zd'd(� Zd)d*� ZG d+d,� d,�ZG d-d.� d.e�Z G d/d0� d0e �Z!G d1d2� d2e �Z"G d3d4� d4e�Z#G d5d6� d6e�Z$dS )7� N� )�log)�StoragePool�
StorageVolume)�xmlutilc
C sh z| � |�}|�� |dfW S tjyb } z,|�� rF|�� tjkrF� d|fW Y d}~S d}~0 0 dS )z�
Try to find a volume matching the full passed path. Call info() on
it to ensure the volume wasn't removed behind libvirt's back
N)ZstorageVolLookupByPath�info�libvirtZlibvirtErrorZget_error_codeZVIR_ERR_NO_STORAGE_VOL)�conn�path�vol�e� r
�//usr/share/virt-manager/virtinst/diskbackend.py�_lookup_vol_by_path s
r c C s&