From: "André Erdmann" <dywi@mailerd.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/remote/
Date: Sat, 15 Feb 2014 19:49:51 +0000 (UTC) [thread overview]
Message-ID: <1392490736.668d08e8d76e332e63884b1e10ebc26faa2eb358.dywi@gentoo> (raw)
commit: 668d08e8d76e332e63884b1e10ebc26faa2eb358
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Sat Feb 15 18:58:56 2014 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Sat Feb 15 18:58:56 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=668d08e8
roverlay/remote/rsync: remote redundant _set_status
RsyncRepo->_dosync(): don't call _set_ready()/_set_fail()
This is done by BasicRepo->sync() anyway.
---
roverlay/remote/rsync.py | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/roverlay/remote/rsync.py b/roverlay/remote/rsync.py
index 85cbde7..925dc87 100644
--- a/roverlay/remote/rsync.py
+++ b/roverlay/remote/rsync.py
@@ -8,6 +8,7 @@
__all__ = [ 'RsyncRepo', ]
+import os
import sys
import subprocess
@@ -121,6 +122,7 @@ class RsyncRepo ( BasicRepo ):
"""Syncs this repo. Returns True if sync succeeded, else False.
All exceptions(?) are catched and interpreted as sync failure.
"""
+ assert os.EX_OK not in RETRY_ON_RETCODE
def waitfor ( p ):
if p.communicate() != ( None, None ):
@@ -160,11 +162,7 @@ class RsyncRepo ( BasicRepo ):
proc = subprocess.Popen ( rsync_cmd, env=RSYNC_ENV )
retcode = waitfor ( proc )
proc = None
-
- if retcode == 0:
- self._set_ready ( is_synced=True )
- return True
-
+ # -- end while
except KeyboardInterrupt:
# maybe add terminate/kill code here,
@@ -186,11 +184,14 @@ class RsyncRepo ( BasicRepo ):
# catch exceptions, log them and return False
self.logger.exception ( e )
- self.logger.error (
- 'Repo {name} cannot be used for ebuild creation due to errors '
- 'while running rsync (return code was {ret}).'.format (
- name=self.name, ret=retcode
- ) )
- self._set_fail()
- return False
+
+ if retcode == os.EX_OK:
+ return True
+ else:
+ self.logger.error (
+ 'Repo {name} cannot be used for ebuild creation due to errors '
+ 'while running rsync (return code was {ret}).'.format (
+ name=self.name, ret=retcode
+ ) )
+ return False
# --- end of _dosync (...) ---
next reply other threads:[~2014-02-15 19:49 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-15 19:49 André Erdmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-01-26 17:41 [gentoo-commits] proj/R_overlay:master commit in: roverlay/remote/ André Erdmann
2014-02-16 16:45 André Erdmann
2014-02-15 19:49 André Erdmann
2014-02-15 19:49 André Erdmann
2013-09-03 13:15 André Erdmann
2013-09-03 8:35 André Erdmann
2013-09-02 16:21 André Erdmann
2013-08-29 15:08 André Erdmann
2013-08-07 16:10 André Erdmann
2013-08-07 16:10 André Erdmann
2013-07-24 9:54 André Erdmann
2013-07-24 9:54 André Erdmann
2013-07-24 9:54 André Erdmann
2013-07-23 14:57 André Erdmann
2013-07-23 9:38 [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-07-23 14:57 ` [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-07-23 9:38 [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-07-23 14:57 ` [gentoo-commits] proj/R_overlay:master " André Erdmann
2013-07-16 16:35 [gentoo-commits] proj/R_overlay:gsoc13/next " André Erdmann
2013-07-16 16:36 ` [gentoo-commits] proj/R_overlay:master " André Erdmann
2012-08-13 18:07 André Erdmann
2012-08-11 0:01 André Erdmann
2012-08-10 15:16 André Erdmann
2012-08-10 15:16 André Erdmann
2012-08-09 9:26 André Erdmann
2012-08-02 15:14 André Erdmann
2012-08-01 7:33 André Erdmann
2012-07-31 17:51 André Erdmann
2012-07-09 17:25 André Erdmann
2012-07-06 8:15 André Erdmann
2012-07-04 18:21 André Erdmann
2012-07-04 18:21 André Erdmann
2012-07-03 17:48 André Erdmann
2012-06-27 14:46 André Erdmann
2012-06-26 15:55 André Erdmann
2012-06-26 15:42 André Erdmann
2012-06-25 18:19 André Erdmann
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=1392490736.668d08e8d76e332e63884b1e10ebc26faa2eb358.dywi@gentoo \
--to=dywi@mailerd.de \
--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