From 4bdb0ee0465374b44958c4887128cee27aa55d76 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Mon, 22 Dec 2014 10:38:21 +0200 Subject: [PATCH] update code --- slpkg/repolist.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/slpkg/repolist.py b/slpkg/repolist.py index 30424124..3ff68f63 100644 --- a/slpkg/repolist.py +++ b/slpkg/repolist.py @@ -26,7 +26,10 @@ import sys from repositories import Repo from messages import template -from __metadata__ import repositories, color +from __metadata__ import ( + repositories, + color +) class RepoList(object): @@ -55,11 +58,9 @@ class RepoList(object): 'Status')) template(78) for repo_id, repo_name in sorted(self.all_repos.iteritems()): - status = 'disabled' - COLOR = color['RED'] + status, COLOR = 'disabled', color['RED'] if repo_id in repositories: - status = 'enabled' - COLOR = color['GREEN'] + status, COLOR = 'enabled', color['GREEN'] print(' {0}{1}{2}{3}{4}{5:>15}{6}'.format( repo_id, ' ' * (17 - len(repo_id)), repo_name, ' ' * (45 - len(repo_name)),