diff options
Diffstat (limited to 'django/forms')
| -rw-r--r-- | django/forms/widgets.py | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py index 13674e406b..365b7ba8c0 100644 --- a/django/forms/widgets.py +++ b/django/forms/widgets.py @@ -378,14 +378,6 @@ class ClearableFileInput(FileInput): """ Return whether value is considered to be initial value. """ - # hasattr() masks exceptions on Python 2. - if six.PY2: - try: - getattr(value, 'url') - except AttributeError: - return False - else: - return bool(value) return bool(value and hasattr(value, 'url')) def get_template_substitution_values(self, value): |
