[Yt-svn] commit/yt: MatthewTurk: Wrapping functions inside the decorators for plot window.
Bitbucket
commits-noreply at bitbucket.org
Mon Apr 25 05:59:41 PDT 2011
1 new changeset in yt:
http://bitbucket.org/yt_analysis/yt/changeset/f32e536b1153/
changeset: r4197:f32e536b1153
branch: yt
user: MatthewTurk
date: 2011-04-25 14:59:32
summary: Wrapping functions inside the decorators for plot window.
affected #: 1 file (55 bytes)
--- a/yt/visualization/plot_window.py Sun Apr 24 14:58:44 2011 -0600
+++ b/yt/visualization/plot_window.py Mon Apr 25 08:59:32 2011 -0400
@@ -25,6 +25,7 @@
import base64
import tempfile
import matplotlib.pyplot
+from functools import wraps
import numpy as na
from .image_writer import \
@@ -38,6 +39,7 @@
from yt.utilities.amr_utils import write_png_to_file
def invalidate_data(f):
+ @wraps(f)
def newfunc(*args, **kwargs):
f(*args, **kwargs)
args[0]._data_valid = False
@@ -45,10 +47,10 @@
args[0]._recreate_frb()
if args[0]._initfinished:
args[0]._setup_plots()
-
return newfunc
def invalidate_plot(f):
+ @wraps(f)
def newfunc(*args, **kwargs):
args[0]._plot_valid = False
args[0]._setup_plots()
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