[equo,sulfur] port to new configuration files syntax
This commit is contained in:
@@ -130,20 +130,20 @@ def _add_repository(entropy_client, repo_strings):
|
||||
print_warning("[%s] %s" % (
|
||||
purple(repo_string), blue(_("invalid data, skipping")),))
|
||||
continue
|
||||
if not ((repo_string.startswith("repository|")) and \
|
||||
(len(repo_string.split("|")) == 5)):
|
||||
|
||||
print_info("%s: %s" % (
|
||||
teal(_("Adding repository string")), blue(repo_string),))
|
||||
|
||||
try:
|
||||
repoid, repodata = SystemSettings._analyze_client_repo_string(
|
||||
repo_string, current_branch, current_product)
|
||||
except AttributeError:
|
||||
print_warning("[%s] %s" % (
|
||||
purple(repo_string),
|
||||
blue(_("invalid repository string, skipping")),)
|
||||
)
|
||||
continue
|
||||
|
||||
print_info("%s: %s" % (
|
||||
teal(_("Adding repository string")), blue(repo_string),))
|
||||
|
||||
repoid, repodata = SystemSettings._analyze_client_repo_string(
|
||||
repo_string, current_branch, current_product)
|
||||
|
||||
# print some info
|
||||
toc = []
|
||||
toc.append((purple(_("Repository id:")), teal(repoid)))
|
||||
|
||||
@@ -262,14 +262,14 @@ class AddRepositoryWindow(MenuSkel):
|
||||
text = input_box(self.addrepo_ui.addRepoWin, _("Insert Repository"),
|
||||
_("Insert Repository identification string")+" ")
|
||||
if text:
|
||||
if (text.startswith("repository|")) and (len(text.split("|")) == 5):
|
||||
current_branch = self._entropy.Settings()['repositories']['branch']
|
||||
current_product = self._entropy.Settings()['repositories']['product']
|
||||
current_branch = self._entropy.Settings()['repositories']['branch']
|
||||
current_product = self._entropy.Settings()['repositories']['product']
|
||||
try:
|
||||
repoid, repodata = \
|
||||
self._entropy.Settings()._analyze_client_repo_string(text,
|
||||
current_branch, current_product)
|
||||
self._load_repo_data(repodata)
|
||||
else:
|
||||
except AttributeError:
|
||||
okDialog( self.addrepo_ui.addRepoWin,
|
||||
_("This Repository identification string is malformed") )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user