Skip to content

Commit

Permalink
Merge pull request #15 from pombredanne/patch-2
Browse files Browse the repository at this point in the history
Fix for #13
  • Loading branch information
codebynumbers committed Jun 17, 2014
2 parents 5306013 + 0b76669 commit 68c6735
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ftpretty.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
f.close()
"""
from ftplib import FTP, FTP_TLS
from ftplib import FTP
try:
from ftplib import FTP_TLS
except ImportError:
FTP_TLS = None
import os
import cStringIO
import re
Expand All @@ -30,7 +34,7 @@ def __init__(self, host, user, password,

if ftp_conn:
self.conn = ftp_conn
elif secure:
elif secure and FTP_TLS:
self.conn = FTP_TLS(host=host, user=user, passwd=password, **kwargs)
self.conn.prot_p()
else:
Expand Down

0 comments on commit 68c6735

Please sign in to comment.