diff --git a/rowers/management/commands/processemail.py b/rowers/management/commands/processemail.py index 8a7d758d..ca92e5a5 100644 --- a/rowers/management/commands/processemail.py +++ b/rowers/management/commands/processemail.py @@ -65,8 +65,6 @@ def processattachment(rower, fileobj, title, uploadoptions,testing=False): # filename = os.path.abspath(fileobj.name) except AttributeError: filename = fileobj[6:] - if testing: - print('Attribute Error', filename) # test if file exists and is not empty @@ -74,12 +72,8 @@ def processattachment(rower, fileobj, title, uploadoptions,testing=False): with io.open('media/'+filename,'rb') as fop: line = fop.readline() except (IOError, UnicodeEncodeError): - if testing: - print('IOError',filename,'media/'+filename) return 0 - if testing: - print('Creating workout from email') # set user if rower.user.is_staff and 'username' in uploadoptions: @@ -134,8 +128,6 @@ def processattachment(rower, fileobj, title, uploadoptions,testing=False): except VirtualRace.DoesNotExist: pass - if testing: - print('Workout id = {workoutid}'.format(workoutid=workoutid)) return workoutid @@ -281,15 +273,6 @@ class Command(BaseCommand): else: # move attachment and make workout - if testing: - try: - print(name) - except UnicodeEncodeError: - print("Unicode Error") - try: - print(attachment.document) - except UnicodeEncodeError: - pass workoutid = processattachment( rower, attachment.document, name, uploadoptions,