3
gt`* @ s d dl mZ d dl mZ d dlmZmZmZ d dlZd dlZd dl Zd dl
Zd dlZd dlZd dl
Z
d dlZd dlZejjG dd dejjZdd Zejd Zejd
ZejdZejdZd
d ZdS ) )absolute_import)unicode_literals)_loggerP_Nc @ sR e Zd ZdgZedjejjdZ e
dd Zdd Zdd Z
d
d Zdd
ZdS )ConfigManagerCommandzconfig-managerz4manage {prog} configuration options and repositories)progc C s | j dddtdd | j dddtd d
| j dg dd
tdd | j dddtdd
| j dddtdd
| j }|j ddddtdd |j ddddtdd d S )Ncrepo*repozrepo to modify)nargsmetavarhelpz--saveF
store_truez/save the current options (useful with --setopt))defaultactionr z
--add-repoappendZURLz8add (and enable) the repo from the specified file or url)r r r
r z--dumpz,print current configuration values to stdoutz--dump-variableszprint variable values to stdoutz
--set-enabledset_enabledz"enable repos (automatically saves))r destr r z--set-disabledset_disabledz#disable repos (automatically saves))add_argumentr Zadd_mutually_exclusive_group)parserZenable_group r $/usr/lib/python3.6/config_manager.py
set_argparser) s, z"ConfigManagerCommand.set_argparserc C s | j j}d|_| jjg kp@| jjp@| jjp@| jjp@| jjp@| jj sp| j j
jtdj
djdddddd d
dg | jjg krtjtd | jjs| jj s| jjs| jjrd|_d
d | jjD }dd |D | j_d S )NTz.one of the following arguments is required: {} z--savez
--add-repoz--dumpz--dump-variablesz
--set-enabledz--enablez--set-disabledz --disablez{Warning: --enablerepo/--disablerepo arguments have no meaningwith config manager. Use --set-enabled/--set-disabled instead.c S s g | ]}|d kr|j d qS ),)split).0xr r r