Add patch for exception check of TypeError
This commit is contained in:
parent
77b8ec099b
commit
94b3a35d7a
25
0001-Change-exception-check-of-TypeError.patch
Normal file
25
0001-Change-exception-check-of-TypeError.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 1b7ea533ea79bacbb14979e92416fa03b22ee774 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Kuska <rkuska@redhat.com>
|
||||
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
|
||||
|
||||
@ -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 <rkuska@redhat.com> - 3.2-2
|
||||
- Add patch for exception check of TypeError
|
||||
|
||||
* Sun Aug 24 2014 Robert Kuska <rkuska@redhat.com> - 3.2-1
|
||||
- Update to 3.2
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user