public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Brian Dolbec" <brian.dolbec@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/emaint/modules/sync/
Date: Thu,  4 Dec 2014 20:16:11 +0000 (UTC)	[thread overview]
Message-ID: <1417723107.d3b91ee6493a9a5ac63e47e119ed7b73a2119e94.dol-sen@gentoo> (raw)
Message-ID: <20141204201611.lt0lmdIU4n104Sl4FqtrcemLZKlsu2xK8_J4_zagvZA@z> (raw)

commit:     d3b91ee6493a9a5ac63e47e119ed7b73a2119e94
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Thu Dec  4 18:20:13 2014 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu Dec  4 19:58:27 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=d3b91ee6

emaint/modules/sync/sync.py: Fix a bug in the output if a specified repo did not exist

---
 pym/portage/emaint/modules/sync/sync.py | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/pym/portage/emaint/modules/sync/sync.py b/pym/portage/emaint/modules/sync/sync.py
index 1dade6f..77c685c 100644
--- a/pym/portage/emaint/modules/sync/sync.py
+++ b/pym/portage/emaint/modules/sync/sync.py
@@ -9,7 +9,7 @@ import portage
 portage._internal_caller = True
 portage._sync_mode = True
 from portage.localization import _
-from portage.output import bold, create_color_func
+from portage.output import bold, red, create_color_func
 from portage._global_updates import _global_updates
 from portage.sync.controller import SyncManager
 from portage.util import writemsg_level
@@ -116,6 +116,13 @@ class SyncRepos(object):
 			repos = repos.split()
 		available = self._get_repos(auto_sync_only=False)
 		selected = self._match_repos(repos, available)
+		if not selected:
+			msgs = [red(" * ") + "Emaint sync, The specified repos were not found: %s"
+				% (bold(", ".join(repos))) + "\n   ...returning"
+				]
+			if return_messages:
+				return msgs
+			return
 		return self._sync(selected, return_messages)
 
 
@@ -187,7 +194,8 @@ class SyncRepos(object):
 		if not selected_repos:
 			msgs.append("Emaint sync, nothing to sync... returning")
 			if return_messages:
-				return msgs.append(self.rmessage(('None', os.EX_OK), 'sync'))
+				msgs.extend(self.rmessage([('None', os.EX_OK)], 'sync'))
+				return msgs
 			return
 		# Portage needs to ensure a sane umask for the files it creates.
 		os.umask(0o22)


             reply	other threads:[~2014-12-04 20:16 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-04 20:04 Brian Dolbec [this message]
2014-12-04 20:16 ` [gentoo-commits] proj/portage:master commit in: pym/portage/emaint/modules/sync/ Brian Dolbec
  -- strict thread matches above, loose matches on Subject: below --
2014-12-04 20:16 Brian Dolbec
2014-12-04 20:04 ` [gentoo-commits] proj/portage:plugin-sync " Brian Dolbec
2014-12-04 20:16 [gentoo-commits] proj/portage:master " Brian Dolbec
2014-12-04 20:04 ` [gentoo-commits] proj/portage:plugin-sync " Brian Dolbec
2014-12-04 20:16 [gentoo-commits] proj/portage:master " Brian Dolbec
2014-12-04 20:04 ` [gentoo-commits] proj/portage:plugin-sync " Brian Dolbec
2014-12-04 20:04 Brian Dolbec
2014-12-01 21:50 Michał Górny
2014-12-01 21:50 Michał Górny
2014-12-01 21:50 Michał Górny
2014-12-01 21:50 Michał Górny
2014-12-01 21:50 Michał Górny
2014-10-22 13:36 Zac Medico
2014-10-22 12:30 Zac Medico
2014-10-21 20:55 Zac Medico
2014-10-21  5:05 Zac Medico
2014-10-21  5:05 Zac Medico
2014-10-21  5:05 Zac Medico
2014-10-20  3:54 Zac Medico
2014-10-20  3:54 Zac Medico
2014-10-20  3:54 Zac Medico
2014-10-20  3:54 Zac Medico
2014-09-30  0:46 Brian Dolbec
2014-09-30  0:46 Brian Dolbec
2014-09-30  0:46 Brian Dolbec
2014-09-30  0:46 Brian Dolbec
2014-09-29 18:29 Brian Dolbec
2014-09-29 18:29 Brian Dolbec
2014-09-29 18:29 Brian Dolbec
2014-09-29 18:29 Brian Dolbec
2014-09-27  2:20 Brian Dolbec
2014-09-27  2:20 Brian Dolbec
2014-09-27  2:20 Brian Dolbec
2014-09-27  2:20 Brian Dolbec
2014-09-05 21:15 Brian Dolbec
2014-09-05 21:15 Brian Dolbec
2014-09-05 21:15 Brian Dolbec
2014-09-05 21:15 Brian Dolbec
2014-09-05  4:38 Brian Dolbec
2014-09-05  4:38 Brian Dolbec
2014-09-05  4:38 Brian Dolbec
2014-09-04  1:18 Brian Dolbec
2014-09-03 23:36 Brian Dolbec
2014-09-03 23:36 Brian Dolbec
2014-06-16 22:45 Brian Dolbec
2014-06-16 22:45 Brian Dolbec
2014-06-16 15:46 Brian Dolbec
2014-06-16 15:46 Brian Dolbec
2014-06-16 15:18 Brian Dolbec
2014-06-16 15:18 Brian Dolbec
2014-05-11 17:22 Brian Dolbec
2014-05-02 23:13 Brian Dolbec
2014-04-22  2:36 Brian Dolbec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1417723107.d3b91ee6493a9a5ac63e47e119ed7b73a2119e94.dol-sen@gentoo \
    --to=brian.dolbec@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox