MantisWS : improve error log of add_note_to_issue() method and raise exception on unknown error
Benjamin Renard

Benjamin Renard commited on 2012-04-20 15:31:05
Showing 1 changed files, with 2 additions and 1 deletions.

... ...
@@ -76,12 +76,13 @@ class MantisWS(object):
76 76
 			)
77 77
 			return res
78 78
 		except suds.WebFault, e:
79
-			logging.error('Problem adding attachment %s to issue %s : %s' % (attachment['filename'],issue_id,e))
79
+			logging.error('Problem adding attachment %s to issue %s' % (attachment['filename'],issue_id))
80 80
 			err=str(e)
81 81
 			if re.search('Duplicate filename',err):
82 82
 				raise MantisWSError('duplicate_attachment_filename','Duplicate attachment filename %s in issue %s' % (attachment['filename'],issue_id))
83 83
 		except:
84 84
 			logging.error('Problem adding attachment %s to issue %s' % (attachment['filename'],issue_id))
85
+			raise MantisWSError('general_attachment','Problem adding attachment %s to issue %s' % (attachment['filename'],issue_id))
85 86
 			return None
86 87
 
87 88
         def set_option(self,option,value):
88 89