Skip to content

Commit

Permalink
Made Eudora2Mbox cope if no embedded directory was set / found.
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Feb 3, 2011
1 parent d7c8ba9 commit 4fe21f7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Eudora2Mbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ def craft_message( headers, body, attachments, embeddeds, mbx, is_html):
if i < len(embeddeds):
print embeddeds[i],

if os.path.exists(edir + os.sep + embeddeds[i]):
if edir and os.path.exists(edir + os.sep + embeddeds[i]):
print " *"
else:
print " !"
Expand Down Expand Up @@ -914,10 +914,13 @@ def handle_embedded( cid, filename, message ):
global paths_found, paths_missing
global missing_attachments, found_attachments

realfilename = edir + os.sep + filename
if edir:
realfilename = edir + os.sep + filename

if not os.path.exists(realfilename):
print "Couldn't find embedded file %s" % (realfilename,)
if not os.path.exists(realfilename):
print "Couldn't find embedded file %s" % (realfilename,)
return
else:
return

mimeinfo = mimetypes.guess_type(realfilename)
Expand Down

0 comments on commit 4fe21f7

Please sign in to comment.