From 94b3a35d7a1b8fe0752acba9e97972120ef4baf4 Mon Sep 17 00:00:00 2001 From: Robert Kuska Date: Aug 24 2014 15:42:07 +0000 Subject: Add patch for exception check of TypeError --- diff --git a/0001-Change-exception-check-of-TypeError.patch b/0001-Change-exception-check-of-TypeError.patch new file mode 100644 index 0000000..b263057 --- /dev/null +++ b/0001-Change-exception-check-of-TypeError.patch @@ -0,0 +1,25 @@ +From 1b7ea533ea79bacbb14979e92416fa03b22ee774 Mon Sep 17 00:00:00 2001 +From: Robert Kuska +Date: Sun, 24 Aug 2014 15:42:41 +0200 +Subject: [PATCH] Change exception check of TypeError + +--- + click/core.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/click/core.py b/click/core.py +index b4c7368..fd179a2 100644 +--- a/click/core.py ++++ b/click/core.py +@@ -432,7 +432,7 @@ class Context(object): + except TypeError as e: + if not injected_arguments: + raise +- if 'got multiple values for keyword argument' in str(e): ++ if 'got multiple values for' in str(e): + raise RuntimeError( + 'You called .invoke() on the context with a command ' + 'but provided parameters as positional arguments. ' +-- +1.9.3 + diff --git a/python-click.spec b/python-click.spec index d7df3fc..083afca 100644 --- a/python-click.spec +++ b/python-click.spec @@ -4,12 +4,14 @@ Name: python-%{pypi_name} Version: 3.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A simple wrapper around optparse for powerful command line utilities License: BSD URL: http://github.com/mitsuhiko/click Source0: https://pypi.python.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +#https://github.com/mitsuhiko/click/pull/209 +Patch1: 0001-Change-exception-check-of-TypeError.patch BuildArch: noarch BuildRequires: python-devel @@ -44,6 +46,7 @@ comes with good defaults out of the box. %prep %setup -q -n %{pypi_name}-%{version} +%patch1 -p1 %if 0%{?with_python3} rm -rf %{py3dir} @@ -95,6 +98,9 @@ popd %changelog +* Sun Aug 24 2014 Robert Kuska - 3.2-2 +- Add patch for exception check of TypeError + * Sun Aug 24 2014 Robert Kuska - 3.2-1 - Update to 3.2