[Yt-svn] yt-commit r994 - trunk/yt

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Tue Dec 9 15:02:44 PST 2008


Author: mturk
Date: Tue Dec  9 15:02:43 2008
New Revision: 994
URL: http://yt.spacepope.org/changeset/994

Log:
Fixing my bad code.



Modified:
   trunk/yt/funcs.py

Modified: trunk/yt/funcs.py
==============================================================================
--- trunk/yt/funcs.py	(original)
+++ trunk/yt/funcs.py	Tue Dec  9 15:02:43 2008
@@ -157,12 +157,12 @@
     defaultdict = __defaultdict
 
 def rootonly(func):
+    @wraps(func)
     def donothing(*args, **kwargs):
         return
-    def dosomething(*args, **kwargs):
-        func(*args, **kwargs)
-    if ytcfg.getint("yt","__parallel_rank") > 0: dosomething
-    return dosomething
+    from yt.config import ytcfg
+    if ytcfg.getint("yt","__parallel_rank") > 0: return dosomething
+    return func
 
 def only_on_root(func, *args, **kwargs):
     from yt.config import ytcfg



More information about the yt-svn mailing list