Index: /trunk/email2trac.py.in
===================================================================
--- /trunk/email2trac.py.in	(revision 449)
+++ /trunk/email2trac.py.in	(revision 450)
@@ -212,37 +212,30 @@
 			self.USE_TEXTWRAP = 0
 
-		if self.parameters.has_key('binhex'):
+		if self.parameters.binhex:
 			self.STRIP_CONTENT_TYPES.append('application/mac-binhex40')
 
-		if self.parameters.has_key('applesingle'):
+		if self.parameters.applesingle:
 			self.STRIP_CONTENT_TYPES.append('application/applefile')
 
-		if self.parameters.has_key('appledouble'):
+		if self.parameters.appledouble:
 			self.STRIP_CONTENT_TYPES.append('application/applefile')
 
-		if self.parameters.has_key('strip_content_types'):
-			items = self.parameters['strip_content_types'].split(',')
+		if self.parameters.strip_content_types:
+			items = self.parameters.strip_content_types.split(',')
 			for item in items:
 				self.STRIP_CONTENT_TYPES.append(item.strip())
 
-		self.WORKFLOW = None
-		if self.parameters.has_key('workflow'):
-			self.WORKFLOW = self.parameters['workflow']
-
-		# Use OS independend functions
-		#
-		self.TMPDIR = os.path.normcase('/tmp')
-		if self.parameters.has_key('tmpdir'):
-			self.TMPDIR = os.path.normcase(str(self.parameters['tmpdir']))
-
-		if self.parameters.has_key('ignore_trac_user_settings'):
-			self.IGNORE_TRAC_USER_SETTINGS = int(self.parameters['ignore_trac_user_settings'])
-		else:
-			self.IGNORE_TRAC_USER_SETTINGS = 0
-
-		if self.parameters.has_key('email_triggers_workflow'):
-			self.EMAIL_TRIGGERS_WORKFLOW = int(self.parameters['email_triggers_workflow'])
-		else:
-			self.EMAIL_TRIGGERS_WORKFLOW = 1
+		if self.parameters.tmpdir:
+			self.parameters.tmpdir = os.path.normcase(str(self.parameters['tmpdir']))
+		else:
+			self.parameters.tmpdir = os.path.normcase('/tmp')
+
+		if self.parameters.ignore_trac_user_settings:
+			self.parameters.ignore_trac_user_settings = int(self.parameters.ignore_trac_user_settings)
+
+		if self.parameters.email_triggers_workflow == None:
+			self.parameters.email_triggers_workflow = 1
+		else:
+			self.parameters.email_triggers_workflow = int(self.parameters.email_triggers_workflow)
 
 		if self.parameters.has_key('subject_field_separator'):
@@ -360,5 +353,5 @@
 			self.author = self.email_addr
 
-		if self.IGNORE_TRAC_USER_SETTINGS:
+		if self.parameters.ignore_trac_user_settings:
 			return
 
@@ -440,5 +433,5 @@
 			body_file = tempfile.mktemp('.email2trac')
 		else:
-			body_file = os.path.join(self.TMPDIR, 'body.txt')
+			body_file = os.path.join(self.parameters.tmpdir, 'body.txt')
 
 		if self.parameters.dry_run:
@@ -486,5 +479,5 @@
 	
 
-			part_file = os.path.join(self.TMPDIR, filename)
+			part_file = os.path.join(self.parameters.tmpdir, filename)
 			s = 'writing part%d (%s)' % (n,part_file)
 			self.print_unicode(s)
@@ -517,5 +510,5 @@
 		else:
 			#msg_file = '/var/tmp/msg.txt' 
-			msg_file = os.path.join(self.TMPDIR, 'msg.txt')
+			msg_file = os.path.join(self.parameters.tmpdir, 'msg.txt')
 
 		if self.parameters.dry_run:
@@ -811,5 +804,5 @@
 		# We must use the ticket workflow framework
 		#
-		if tkt['status'] in ['closed'] and self.EMAIL_TRIGGERS_WORKFLOW:
+		if tkt['status'] in ['closed'] and self.parameters.email_triggers_workflow:
 
 			#print controller.actions['reopen']
@@ -827,5 +820,5 @@
 			#print 'get_ticket_changes :', b
 
-			if self.WORKFLOW and (self.VERSION >= 0.11 ) :
+			if self.parameters.has_key.workflow and (self.VERSION >= 0.11 ) :
 				from trac.ticket.default_workflow import ConfigurableTicketWorkflow
 				from trac.test import Mock, MockPerm
@@ -834,5 +827,5 @@
 
 				controller = ConfigurableTicketWorkflow(self.env)
-				fields = controller.get_ticket_changes(req, tkt, self.WORKFLOW)
+				fields = controller.get_ticket_changes(req, tkt, self.parameters.has_key.workflow)
 
 				self.logger.debug('Workflow ticket update fields: ')
@@ -1130,5 +1123,5 @@
 			# else we get UnicodeErrors. 
 			#
-			path, fd =  util.create_unique_file(os.path.join(self.TMPDIR, util.text.unicode_quote(filename)))
+			path, fd =  util.create_unique_file(os.path.join(self.parameters.tmpdir, util.text.unicode_quote(filename)))
 			text = part.get_payload(decode=1)
 			if not text:
