minor fix
diff --git a/erpnext/setup/doctype/sales_person/sales_person.py b/erpnext/setup/doctype/sales_person/sales_person.py
index 41a986f..41f461b 100644
--- a/erpnext/setup/doctype/sales_person/sales_person.py
+++ b/erpnext/setup/doctype/sales_person/sales_person.py
@@ -25,8 +25,7 @@
 	def get_email_id(self):
 		profile = webnotes.conn.get_value("Employee", self.doc.employee, "user_id")
 		if not profile:
-			webnotes.msgprint("User ID (Profile) not set for Employee %s" % self.doc.employee, 
-				raise_exception=True)
+			webnotes.throw("User ID (Profile) not set for Employee %s" % self.doc.employee)
 		else:
 			return webnotes.conn.get_value("Profile", profile, "email") or profile
 		
\ No newline at end of file
diff --git a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py
index bd928b5..8f75247 100644
--- a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py
+++ b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py
@@ -93,7 +93,7 @@
 		date_diff = (getdate(end_date) - getdate(start_date)).days
 		add_by = date_diff / no_of_visit
 
-		for visit in range(0, cint(no_of_visit)):
+		for visit in range(cint(no_of_visit)):
 			if (getdate(start_date_copy) < getdate(end_date)):
 				start_date_copy = add_days(start_date_copy, add_by)
 				if len(schedule_list) < no_of_visit: