You can write this as:
msgprint("There is not enough leave balance for Leave Type: %s" % \
  (self.doc.leave_type,), 
  raise_exception=webnotes.conn.get_value("Leave Type", self.doc.leave_type,"allow_negative") or None)