From: Elrond Date: Wed, 6 Feb 2013 23:31:37 +0000 (+0100) Subject: Use system wide EXIF package, if available. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=657a4637999cdf247bf71b5074e41af59b8bd8a2;p=mediagoblin.git Use system wide EXIF package, if available. Created and tested by Simon Fondrie-Teitler. Thanks! --- diff --git a/mediagoblin/tools/exif.py b/mediagoblin/tools/exif.py index 4a1afb0f..ab3f77f0 100644 --- a/mediagoblin/tools/exif.py +++ b/mediagoblin/tools/exif.py @@ -14,7 +14,11 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -from mediagoblin.tools.extlib.EXIF import process_file, Ratio +try: + from EXIF import process_file, Ratio +except ImportError: + from mediagoblin.tools.extlib.EXIF import process_file, Ratio + from mediagoblin.processing import BadMediaFail from mediagoblin.tools.translate import pass_to_ugettext as _