[yt-svn] commit/yt: MatthewTurk: Adding a special case to the config command-line parsing for loglevel

Bitbucket commits-noreply at bitbucket.org
Wed Jan 18 12:35:46 PST 2012


1 new commit in yt:


https://bitbucket.org/yt_analysis/yt/changeset/1530ad858a17/
changeset:   1530ad858a17
branch:      yt
user:        MatthewTurk
date:        2012-01-18 21:35:33
summary:     Adding a special case to the config command-line parsing for loglevel
affected #:  1 file

diff -r 809ee2b7c150a079cb34a28791f715c0efc3ea01 -r 1530ad858a177c4074f9987d51aa0fc7ff495cda yt/startup_tasks.py
--- a/yt/startup_tasks.py
+++ b/yt/startup_tasks.py
@@ -95,6 +95,8 @@
         param, val = values.split("=")
         mylog.debug("Overriding config: %s = %s", param, val)
         ytcfg["yt",param] = val
+        if param == "loglevel": # special case
+            mylog.setLevel(int(val))
 
 parser = argparse.ArgumentParser(description = 'yt command line arguments')
 parser.add_argument("--config", action=SetConfigOption,

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list