backwards compat

This commit is contained in:
AJ ONeal 2015-12-15 03:37:56 -08:00
parent 39c0047fb6
commit 4c027a3846
1 changed files with 11 additions and 1 deletions

View File

@ -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;