From 97d2e734ee3b50bb8c83b6bec56ba093d86a98ee Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 6 Feb 2019 13:22:58 +0100 Subject: [PATCH] Moved import magic statement to the get_mime_type function so Travis won't break --- platypush/utils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platypush/utils/__init__.py b/platypush/utils/__init__.py index 84a23a578..4bada345b 100644 --- a/platypush/utils/__init__.py +++ b/platypush/utils/__init__.py @@ -4,7 +4,6 @@ import hashlib import importlib import inspect import logging -import magic import os import signal import socket @@ -219,6 +218,7 @@ def get_ip_or_hostname(): def get_mime_type(resource): + import magic if resource.startswith('file://'): resource = resource[len('file://'):]