Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Matthias Runge
a5b7552a22 Fix for bz 652188 utils.py:40:is_model:TypeError: '_Yes' object is not iterable 2011-11-28 08:57:22 +01:00
2 changed files with 21 additions and 2 deletions

View file

@ -0,0 +1,14 @@
diff -ur a/django-lint/DjangoLint/AstCheckers/settings.py b/django-lint/DjangoLint/AstCheckers/settings.py
--- a/django-lint/DjangoLint/AstCheckers/settings.py 2010-01-21 15:29:22.000000000 +0100
+++ b/django-lint/DjangoLint/AstCheckers/settings.py 2011-11-25 14:10:37.542460795 +0100
@@ -74,6 +74,10 @@
xs = safe_infer(ass).get_children()
except AttributeError:
return
+ try:
+ xs_iterable = iter(xs)
+ except TypeError:
+ return
return [(x, x.value) for x in xs if isinstance(safe_infer(x), astng.Const)]

View file

@ -6,7 +6,7 @@
Name: django-lint
Version: 0.13
Release: 9%{?dist}
Release: 10%{?dist}
Summary: Analyzes Django code looking for bugs and signs of poor quality
Group: Development/Debuggers
@ -16,6 +16,8 @@ Source0: http://chris-lamb.co.uk/releases/%{name}/%{name}-%{version}/%{na
BuildArch: noarch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Patch0: django-lint-type-error-iterable.patch
BuildRequires: python2-devel
Requires: Django
Requires: pylint
@ -35,7 +37,7 @@ Django Lint is currently implemented as a wrapper around PyLint.
%prep
%setup -q -n %{name}
%patch0 -p2
%build
%{__python} setup.py build
@ -63,6 +65,9 @@ rm -rf %{buildroot}
%changelog
* Mon Nov 28 2011 Matthias Runge <mrunge@matthias-runge.de> - 0.13-10
- Fix for bz 652188 utils.py:40:is_model:TypeError: '_Yes' object is not iterable
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.13-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild