Package config_client :: Module rhncfgcli_channels
[hide private]
[frames] | no frames]

Source Code for Module config_client.rhncfgcli_channels

 1  # 
 2  # Copyright (c) 2008--2016 Red Hat, Inc. 
 3  # 
 4  # This software is licensed to you under the GNU General Public License, 
 5  # version 2 (GPLv2). There is NO WARRANTY for this software, express or 
 6  # implied, including the implied warranties of MERCHANTABILITY or FITNESS 
 7  # FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2 
 8  # along with this software; if not, see 
 9  # http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. 
10  # 
11  # Red Hat trademarks are not licensed under GPLv2. No permission is 
12  # granted to use or replicate Red Hat trademarks that are incorporated 
13  # in this software or its documentation. 
14  # 
15   
16  from config_common.rhn_log import log_debug 
17   
18  import handler_base 
19   
20 -class Handler(handler_base.HandlerBase):
21 - def run(self):
22 log_debug(2) 23 r = self.repository 24 25 config_channels = r.load_config_channels() 26 if not config_channels: 27 print("(no config channels associated with this system)") 28 return 29 print("Config channels:") 30 templ = "%-32s%s" 31 label = "Label" 32 name = "Name" 33 print(templ % (label, name)) 34 print(templ % ('-' * len(label), '-' * len(name))) 35 for c in config_channels: 36 print(templ % (c['label'], c['name']))
37