aboutsummaryrefslogtreecommitdiffstats
path: root/python/tasks.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/tasks.py')
-rw-r--r--python/tasks.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/python/tasks.py b/python/tasks.py
index 7cc28c41..05c5f51c 100644
--- a/python/tasks.py
+++ b/python/tasks.py
@@ -10,18 +10,14 @@ def build_portfolios(workdate, dealname, reinvflag):
logpath = os.path.join(os.environ['LOG_DIR'])
args = ["Rscript", "--vanilla", os.path.join(rpath, "build_portfolios.R"), \
workdate, dealname + "," + reinvflag]
- with open(os.path.join(logpath, "build_portfolios.Rout"), "w") as fh:
- subprocess.call(args, stderr=subprocess.STDOUT, stdout=fh, env=os.environ,
- cwd=rpath)
+ subprocess.check_call(args, env=os.environ, cwd=rpath)
def build_scenarios(workdate, dealname, reinvflag):
rpath = os.path.join(os.environ['CODE_DIR'], "R")
logpath = os.path.join(os.environ['LOG_DIR'])
args = ["Rscript", "--vanilla", os.path.join(rpath, "build_scenarios.R"), \
workdate, dealname + "," + reinvflag]
- with open(os.path.join(logpath, "build_scenarios.Rout"), "w") as fh:
- subprocess.call(args, stderr=subprocess.STDOUT, stdout=fh, env=os.environ,
- cwd=rpath)
+ subprocess.check_call(args, env=os.environ, cwd=rpath)
class Rpc(object):
def __init__(self, fun, args):