From 60e5077969cdf8b67c5802a60ea6e759bef4d354 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Sat, 6 Mar 2010 12:30:42 +0100 Subject: [PATCH] Allow specifying variable options with the params argument. --- patoolib/baker.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/patoolib/baker.py b/patoolib/baker.py index 94ed5fe..3f3d548 100644 --- a/patoolib/baker.py +++ b/patoolib/baker.py @@ -185,9 +185,12 @@ class Baker(object): # If the user didn't specify shortopts = shortopts or {} - # Zip up the keyword argument names with their defaults if defaults: + # Zip up the keyword argument names with their defaults keywords = dict(zip(arglist[0-len(defaults):], defaults)) + elif has_kwargs: + # allow keyword arguments specified by params + keywords = dict(zip(params.keys(), [""]*len(params))) else: keywords = {}