After the koji.conf 'pkgurl' attribute was enabled (sigul wants this; I'll submit a patch for that too, later), one of my scripts broke because the "Warning: the pkgurl option is obsolete" message is printed to stdout instead of stderr. Here's a little patch to print the warning with the warn() function instead.

I realize some warnings from the cli might be best printed to stdout, but for ones that might appear when using a computer-readable type of command like 'list-* --quiet', stderr seems like the better choice.

Thanks-

        John
diff --git a/cli/koji b/cli/koji
index 1eec615..4030a46 100755
--- a/cli/koji
+++ b/cli/koji
@@ -234,14 +234,15 @@ def get_options():
     #pkgurl is obsolete
     if options.pkgurl:
         if options.topurl:
-            print "Warning: the pkgurl option is obsolete"
+            warn("Warning: the pkgurl option is obsolete")
         else:
             suggest = re.sub(r'/packages/?$', '', options.pkgurl)
             if suggest != options.pkgurl:
-                print "Warning: the pkgurl option is obsolete, using topurl=%r" % suggest
+                warn("Warning: the pkgurl option is obsolete, using topurl=%r" 
+                     % suggest)
                 options.topurl = suggest
             else:
-                print "Warning: The pkgurl option is obsolete, please use topurl instead"
+                warn("Warning: The pkgurl option is obsolete, please use topurl instead")
 
     return options, cmd, args[1:]
 
--
buildsys mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/buildsys

Reply via email to