From c797f4dfc4e73aaaa973d7a92f404bc74311d072 Mon Sep 17 00:00:00 2001 From: Kory Kyzar Date: Fri, 19 Jan 2018 13:46:04 -0600 Subject: [PATCH] Bug fix --- pymisp/api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pymisp/api.py b/pymisp/api.py index f2bbe48..60f015c 100644 --- a/pymisp/api.py +++ b/pymisp/api.py @@ -566,18 +566,18 @@ class PyMISP(object): """ if isinstance(attachment, basestring) and os.path.isfile(attachment): # We have a file to open - if filename = None: + if filename == None: filename = os.path.basename(attachment) with open(attachment, "rb") as f: fileData = f.read() elif hasattr(attachment, "read"): # It's a file handle - we can read it but it has no filename fileData = attachment.read() - if filename = None: + if filename == None: filename = 'attachment' elif isinstance(attachment, (tuple, list)): # tuple/list (filename, pseudofile) - if filename = None: + if filename == None: filename = attachment[0] if hasattr(attachment[1], "read"): # Pseudo file @@ -586,7 +586,7 @@ class PyMISP(object): fileData = attachment[1] else: # Plain file content, no filename - if filename = None: + if filename == None: filename = 'attachment' fileData = attachment