From: mjmac Date: Tue, 9 Aug 2005 20:29:24 +0000 (+0000) Subject: Added an info() sub for non-warning, non-error messages, and modified X-Git-Tag: v1_7_140~1^12~3^2~55^5~40 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=1165e9d6acb744b049a513b26a5b39b8a2f69692;p=fs%2Flustre-release.git Added an info() sub for non-warning, non-error messages, and modified warning() as well. Both now use stderr for output. --- diff --git a/lustre/utils/lmc b/lustre/utils/lmc index 9aa8104..f60def2 100755 --- a/lustre/utils/lmc +++ b/lustre/utils/lmc @@ -227,10 +227,13 @@ def panic(cmd, msg): print msg sys.exit(1) - def warning(*args): msg = string.join(map(str,args)) - print "Warning: ", msg + sys.stderr.write("WARNING: %s\n" % (msg)) + +def info(*args): + msg = string.join(map(str,args)) + sys.stderr.write("INFO: %s\n" % (msg)) # # manage names and uuids @@ -890,8 +893,8 @@ def add_lov(gen, lustre, options): stripe_sz = get_option_int(options, 'stripe_sz') stripe_cnt = get_option_int(options, 'stripe_cnt') if stripe_cnt == 0: - print "default stripe count (0) - will use %d stripe(s) per file" \ - % DEFAULT_STRIPE_CNT + info("default stripe count (0) - will use %d stripe(s) per file" \ + % DEFAULT_STRIPE_CNT) pattern = get_option_int(options, 'stripe_pattern') uuid = new_uuid(name)