From 6be205b03c9b6873ac2557e2cddc98ac63d7fe47 Mon Sep 17 00:00:00 2001 From: William Stein Date: Thu, 11 Jan 2007 18:37:38 -0800 Subject: [PATCH] Make gap interface slightly more robust -- automate first load of gap_reset_workspace. --- src/sage/interfaces/gap.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sage/interfaces/gap.py b/src/sage/interfaces/gap.py index cecc77b301d..334f02febbd 100644 --- a/src/sage/interfaces/gap.py +++ b/src/sage/interfaces/gap.py @@ -165,7 +165,9 @@ gap_cmd = "gap" def gap_command(use_workspace_cache=True): - if use_workspace_cache and os.path.exists(WORKSPACE): + if use_workspace_cache: + if not os.path.exists(WORKSPACE): + gap_reset_workspace() return "%s -L %s"%(gap_cmd, WORKSPACE), False else: return gap_cmd, True