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„ dejjƒƒZdd„ Zejd ƒZejd
ƒZejdƒZejdƒZd
d„ ZdS )é )Úabsolute_import)Úunicode_literals)Ú_ÚloggerÚP_Nc @ sR e Zd ZdgZedƒjejjd�Z e
dd„ ƒZdd„ Zdd „ Z
d
d„ Zdd
„ ZdS )ÚConfigManagerCommandzconfig-managerz4manage {prog} configuration options and repositories)Úprogc C s¬ | j dddtdƒd� | j dddtd ƒd
� | j dg dd
tdƒd� | j dddtdƒd
� | j dddtdƒd
� | jƒ }|j ddddtdƒd� |j ddddtdƒd� d S )NÚcrepoÚ*Úrepozrepo to modify)ÚnargsÚmetavarÚhelpz--saveFÚ
store_truez/save the current options (useful with --setopt))ÚdefaultÚactionr z
--add-repoÚappendZURLz8add (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-enabledÚset_enabledz"enable repos (automatically saves))r Údestr r z--set-disabledÚset_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
jtdƒj
djdddddd d
dgƒƒƒ | jjg krŠtjtdƒƒ | jjsª| jj sª| jjsª| jjr°d|_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)Ú.0Úxr r r ú