Keep run_str on orig_run_str to help subclasses

This commit is contained in:
Thomas Nagy 2015-02-19 08:58:53 +01:00
parent 6481398a82
commit 517578b5d2
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
1 changed files with 2 additions and 0 deletions

View File

@ -86,6 +86,8 @@ class store_task_type(type):
# if a string is provided, convert it to a method
(f, dvars) = compile_fun(cls.run_str, cls.shell)
cls.hcode = cls.run_str
cls.orig_run_str = cls.run_str
# change the name of run_str or it is impossible to subclass with a function
cls.run_str = None
cls.run = f
cls.vars = list(set(cls.vars + dvars))