Skip to content

Commit

Permalink
Added fallback for BeautifulSoup import in utils
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Kaufhold committed Apr 12, 2016
1 parent 7b18815 commit 046c6d9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
=== 1.67.X ===

- added fallback for BeautifulSoup import in utils
- prepared app for Django 1.9 and Python 3.5
- dropped support for Django<1.6
- Removed deprecated stuff and updated docs
Expand Down
2 changes: 1 addition & 1 deletion django_libs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-
__version__ = '1.67.1'
__version__ = '1.67.2'
7 changes: 6 additions & 1 deletion django_libs/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Additional helpful utility functions."""
import random
import sys

from django.conf import settings

Expand All @@ -11,7 +12,11 @@
try:
from bs4 import BeautifulSoup
except ImportError:
pass
sys.stderr.write('Warning: BeatifulSoup could not be imported! Created'
' fallback for tests to work.')

def BeautifulSoup(x, y):
return x


class conditional_decorator(object):
Expand Down

0 comments on commit 046c6d9

Please sign in to comment.