lisp/ob-python.el (org-babel-python-table-or-string): Small fix

Check for empty results.
This commit is contained in:
Sébastien Miquel 2023-12-23 21:11:05 +01:00
parent 539728840f
commit f280b2178c
1 changed files with 2 additions and 1 deletions

View File

@ -205,7 +205,8 @@ specifying a variable of the same value."
If the results look like a list or tuple (but not a dict), then
convert them into an Emacs-lisp table. Otherwise return the
results as a string."
(let ((res (if (string-equal "{" (substring results 0 1))
(let ((res (if (and (> (length results) 0)
(string-equal "{" (substring results 0 1)))
results ;don't covert dicts to elisp
(org-babel-script-escape results))))
(if (listp res)