File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -67,9 +67,16 @@ def is_functional(self):
6767 sage: FriCAS().is_functional() # optional - fricas
6868 FeatureTestResult('fricas', True)
6969 """
70- command = ['fricas -nosman -eval ")quit"' ]
70+ # Use stdin to pass the quit command instead of -eval because
71+ # GCL-compiled FriCAS misinterprets -eval ")quit" as a Lisp expression.
72+ # See :issue:`40569`.
73+ command = ['fricas' , '-nosman' ]
7174 try :
72- lines = subprocess .check_output (command , stderr = subprocess .STDOUT , shell = True )
75+ lines = subprocess .check_output (command , input = b')quit\n ' ,
76+ stderr = subprocess .STDOUT , timeout = 30 )
77+ except subprocess .TimeoutExpired :
78+ return FeatureTestResult (self , False ,
79+ reason = "Call `{command}` timed out" .format (command = " " .join (command )))
7380 except subprocess .CalledProcessError as e :
7481 return FeatureTestResult (self , False ,
7582 reason = "Call `{command}` failed with exit code {e.returncode}" .format (command = " " .join (command ), e = e ))
You can’t perform that action at this time.
0 commit comments