From 4c027a38465dc566177f47dfc86fbe4c1674d802 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 15 Dec 2015 03:37:56 -0800 Subject: [PATCH] backwards compat --- backends/python.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/backends/python.js b/backends/python.js index 4fc1bc9..5df646b 100644 --- a/backends/python.js +++ b/backends/python.js @@ -3,7 +3,17 @@ var PromiseA = require('bluebird'); var fs = PromiseA.promisifyAll(require('fs')); -module.exports.create = function (defaults, opts) { +module.exports.create = function (defaults, opts, extra) { + // v1.0.0 backwards compat + if (3 === arguments.length) { + opts.pythonClientPath = defaults; + defaults = opts; + opts = extra; + } + else if (2 !== arguments.length) { + throw new Error("Instead of creating the python backend yourself, just pass it to LE. See the README.md"); + } + defaults.webroot = true; defaults.renewByDefault = true; defaults.text = true;