Slightly clean-up magic import errors.

This commit is contained in:
Mike Auty
2018-01-30 15:22:50 +00:00
parent 08531c5859
commit 3e3a3a85ba
+2 -3
View File
@@ -6,7 +6,6 @@ import logging
import lzma
import os
import ssl
import sys
import typing
import urllib.parse
import urllib.request
@@ -15,7 +14,7 @@ import zipfile
try:
import magic
except ImportError:
pass
magic = None
try:
import smb.SMBHandler
@@ -94,7 +93,7 @@ class ResourceAccessor(object):
# Determine whether the file is a particular type of file, and if so, open it as such
IMPORTED_MAGIC = False
if 'magic' in sys.modules:
if not magic is None:
while True:
detected = None
try: