scripts/func-command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 scripts/func-command |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit a39ff78d7eb4600142b5ec981a3bf1c11537bf8f
Author: Seth Vidal <skvidal@xxxxxxxxxxxxxxxxx>
Date:   Wed Jun 22 15:11:01 2011 -0400

    make sure we output anything from stderr that func-command can get, too.

diff --git a/scripts/func-command b/scripts/func-command
index 31865c2..a5e990c 100755
--- a/scripts/func-command
+++ b/scripts/func-command
@@ -60,22 +60,22 @@ def main(args):
             fo = open(opts.output_dest + '/' + hn+'.output', 'w')
             fo.write(mycmd + '\n')
             if opts.returncodes:
-                fo.write('%s:\nreturn code:%s\n%s\n' % (hn, output[0], output[1]))
+                fo.write('%s:\nreturn code:%s\n%s\n' % (hn, output[0], ' '.join(output[1:])))
             else:
-                fo.write('%s:\n%s\n' % (hn,output[1]))
+                fo.write('%s:\n%s\n' % (hn,' '.join(output[1:2])))
             fo.close()
             continue
 
         if opts.oneline:
             if opts.returncodes:
-                print '%s:%s:%s' % (hn, output[0], output[1])
+                print '%s:%s:%s' % (hn, output[0], ' '.join(output[1:]))
             else:
-                print '%s:%s' % (hn, output[1])
+                print '%s:%s' % (hn, output[1:2])
         else:
             if opts.returncodes:
-                print '%s:\nreturn code:%s\n%s' % (hn, output[0], output[1])
+                print '%s:\nreturn code:%s\n%s' % (hn, output[0], ' '.join(output[1:]))
             else:
-                print '%s:\n%s' % (hn, output[1])
+                print '%s:\n%s' % (hn, ' '.join(output[1:]))
 
     if opts.output_dest:
         print "output written to %s" % opts.output_dest


_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list


[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux