From ff0c060f077628368f121800bd7da63330879061 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 13 Nov 2006 16:36:22 +0000 Subject: make get_srpm() verbose only when called from the getsrpm command --- RepSys/rpmutil.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'RepSys/rpmutil.py') diff --git a/RepSys/rpmutil.py b/RepSys/rpmutil.py index ac54046..ed62901 100644 --- a/RepSys/rpmutil.py +++ b/RepSys/rpmutil.py @@ -36,7 +36,8 @@ def get_srpm(pkgdirurl, svnlog = 0, scripts = [], submit = False, - template = None): + template = None, + verbose = 0): svn = SVN(baseurl=pkgdirurl) tmpdir = tempfile.mktemp() topdir = "--define '_topdir %s'" % tmpdir @@ -94,7 +95,8 @@ def get_srpm(pkgdirurl, for targetdir in targetdirs: targetsrpm = os.path.join(os.path.realpath(targetdir), os.path.basename(srpm)) targetsrpms.append(targetsrpm) - sys.stderr.write("Wrote: %s\n" % targetsrpm) + if verbose: + sys.stderr.write("Wrote: %s\n" % targetsrpm) execcmd("cp -f", srpm, targetdir) os.unlink(srpm) return targetsrpms -- cgit v1.2.1