On Thu, 2014-02-13 at 15:50 +0100, Valentina Mukhamedzhanova wrote: > Show a warning if user-provided repoid was not found and > exit(1) if none of user-provided repoids were found.
Mostly seems fine to me, but a few minor comments: > --- > reposync.py | 16 ++++++++++++---- > 1 file changed, 12 insertions(+), 4 deletions(-) > > diff --git a/reposync.py b/reposync.py > index b1ee285..962a2ee 100755 > --- a/reposync.py > +++ b/reposync.py > @@ -176,15 +176,23 @@ def main(): > > if len(opts.repoid) > 0: > myrepos = [] > - > + If you have to do these whitespace changes, do them in separate patches than the ones that add/remove/change logic. > # find the ones we want > for glob in opts.repoid: > - myrepos.extend(my.repos.findRepos(glob)) > - > + add_repos = my.repos.findRepos(glob) > + if not add_repos: > + print "Warning: cannot find repository %s" % glob > + continue This print should go to stderr. > + myrepos.extend(add_repos) > + > + if not myrepos: > + sys.exit(1) > + Maybe another error message here "no repos. found" or something? Not sure it matters though. _______________________________________________ Yum-devel mailing list Yum-devel@lists.baseurl.org http://lists.baseurl.org/mailman/listinfo/yum-devel