diff options
author | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2013-02-07 00:31:37 +0100 |
---|---|---|
committer | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2013-02-07 00:31:37 +0100 |
commit | 657a4637999cdf247bf71b5074e41af59b8bd8a2 (patch) | |
tree | 53e9cd506aecf7de055674a7e856236b86eb7000 | |
parent | d9b59fc6e12aada327f84b1ac5532dc2af8af685 (diff) | |
download | mediagoblin-657a4637999cdf247bf71b5074e41af59b8bd8a2.tar.lz mediagoblin-657a4637999cdf247bf71b5074e41af59b8bd8a2.tar.xz mediagoblin-657a4637999cdf247bf71b5074e41af59b8bd8a2.zip |
Use system wide EXIF package, if available.
Created and tested by Simon Fondrie-Teitler.
Thanks!
-rw-r--r-- | mediagoblin/tools/exif.py | 6 |
1 files changed, 5 insertions, 1 deletions
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 <http://www.gnu.org/licenses/>. -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 _ |