diff src/if_py_both.h @ 7660:066ef357ea91 v7.4.1129

commit https://github.com/vim/vim/commit/77324fc9d3206a12f5ae39da1574be3ee1273591 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 17 22:37:03 2016 +0100 patch 7.4.1129 Problem: Python None value can't be converted to a Vim value. Solution: Just use zero. (Damien)
author Christian Brabandt <cb@256bit.org>
date Sun, 17 Jan 2016 22:45:04 +0100
parents de43f10a3850
children bce3b5ddb393
line wrap: on
line diff
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -5521,7 +5521,7 @@ run_eval(const char *cmd, typval_T *rett
     }
     else
     {
-	if (ConvertFromPyObject(run_ret, rettv) == -1)
+	if (run_ret != Py_None && ConvertFromPyObject(run_ret, rettv) == -1)
 	    EMSG(_("E859: Failed to convert returned python object to vim value"));
 	Py_DECREF(run_ret);
     }