Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
suds>=0.4
suds-jurko==0.6
8 changes: 4 additions & 4 deletions srfax/srfax.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import base64
import logging

import suds
from suds import client


URL = 'https://www.srfax.com/SRF_UserFaxWebSrv.php?wsdl'
Expand Down Expand Up @@ -66,7 +66,7 @@ def queue_fax(self, to_fax_number, filepath,
fax_type = 'BROADCAST' if len(to_fax_number) > 1 else 'SINGLE'
to_fax_number = '|'.join(to_fax_number)

if isinstance(filepath, basestring):
if isinstance(filepath, str):
filepath = [filepath]
if not isinstance(filepath, list):
raise TypeError('filepath not properly defined')
Expand All @@ -87,7 +87,7 @@ def queue_fax(self, to_fax_number, filepath,
for i in range(len(filepath)):
path = filepath[i]
basename = os.path.basename(path)
if not isinstance(basename, unicode):
if not isinstance(basename, str):
basename = basename.decode('utf-8')
params['sFileName_%d' % (i + 1)] = basename
params['sFileContent_%d' % (i + 1)] = SRFax.get_file_content(path)
Expand Down Expand Up @@ -253,7 +253,7 @@ def is_nanp_number(number):
def verify_fax_numbers(to_fax_number):
'''Verify and prepare fax numbers for use at SRFax'''

if isinstance(to_fax_number, basestring):
if isinstance(to_fax_number, str):
to_fax_number = [to_fax_number]
if not isinstance(to_fax_number, list):
raise TypeError('to_fax_number not properly defined')
Expand Down