From 254eb3beda4ec883738b322c6d1cdedd2a75c644 Mon Sep 17 00:00:00 2001 From: Mike Stegeman Date: Mon, 30 Oct 2017 07:56:40 -0600 Subject: [PATCH] Update Python value of null/undefined/empty. --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index c36694d..391a382 100644 --- a/index.js +++ b/index.js @@ -73,7 +73,7 @@ function parsePythonConf(str, cb) { } function toPyVal(val) { - if (null === val) { + if (null === val || '' === val) { return 'None'; } else if (true === val) { @@ -119,7 +119,7 @@ function stringifyPythonConf(obj, cb) { if ('undefined' === typeof pyval) { if ('number' === typeof num) { - pyval = ''; + pyval = 'None'; } else { return; }