Viewing: github.cpython-36.pyc
3 �N�b�� � @ s� d Z ddlZddlZddlmZ dZy,ddlZddlZddl Zddl mZ dZW n ek rd Y nX ej e�ZdZdd � Zd d� Zdd � Zd`dd�Zdadd�Zdbdd�Zdcdd�Zdddd�Zdedd�Zdfdd�Zdgdd�Zdhd"d#�Zdid&d'�Zdjd(d)�Zd*d+� Zdkd,d-�Z dld.d/�Z!dmd0d1�Z"dnd2d3�Z#dod4d5�Z$dpd6d7�Z%dqd8d9�Z&drd:d;�Z'dsd<d=�Z(dtd>d?�Z)dud@dA�Z*dvdBdC�Z+dwdDdE�Z,dxdFdG�Z-dydHdI�Z.dzdJdK�Z/d{dLdM�Z0d|dNdO�Z1d}dPdQ�Z2d~dRdS�Z3ddTdU�Z4d�dVdW�Z5dXdY� Z6dZd[� Z7d�d^d_�Z8dS )�a Module for interacting with the GitHub v3 API. .. versionadded:: 2016.3.0 :depends: PyGithub python module Configuration ------------- Configure this module by specifying the name of a configuration profile in the minion config, minion pillar, or master config. The module will use the 'github' key by default, if defined. For example: .. code-block:: yaml github: token: abc1234 org_name: my_organization # optional: some functions require a repo_name, which # can be set in the config file, or passed in at the CLI. repo_name: my_repo # optional: it can be dangerous to change the privacy of a repository # in an automated way. set this to True to allow privacy modifications allow_repo_privacy_changes: False � N)�CommandExecutionErrorF)�UnknownObjectExceptionT�githubc C s t rtS dS )zH Only load this module if PyGithub is installed on this minion. F�PThe github execution module cannot be loaded: PyGithub library is not installed.)Fr )�HAS_LIBS�__virtualname__� r r �/usr/lib/python3.6/github.py�__virtual__8 s r c C sD t d | �}|stdj| ���|j|�}|dkr@tdj|| ���|S )a! Helper function that returns a profile's configuration value based on the supplied configuration name. profile The profile name that contains configuration information. config_name The configuration item's name to use to return configuration values. z config.optionzCAuthentication information could not be found for the '{}' profile.Nz5The '{}' parameter was not found in the '{}' profile.)Z__salt__r �format�get)�profileZconfig_name�configZconfig_valuer r r �_get_config_valueE s r c C s>