Changeset 1029


Ignore:
Timestamp:
11 Dec 2006, 17:03:34 (18 years ago)
Author:
joachim
Message:

checked error messages,
move unknown error to top with new condition.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Widgets_neu.py

    r1026 r1029  
    515515        while do:
    516516            ok = pins.searchAndSetRecord(pin,ref,prefix)
    517             if ok == -2:
     517            if ok < -2 or > 2:
     518                err = 'Unknown error, please report!'
     519                 s_logger.info('"%s","%s", "caused unknown error with pin", "%s"' % (s_id,ref,pin))
     520                break
     521            elif ok == -2:
    518522                err = 'Service already activated but with a different PIN.'
    519523                s_logger.info('"%s","%s", "repeatedly activated service but with different pin", "%s"' % (s_id,ref,pin))
     
    522526                err = 'Invalid PIN'
    523527                 s_logger.info('"%s","%s", "entered invalid pin", "%s"' % (s_id,ref,pin))
    524                 break
    525             elif ok == -3:
    526                 err = 'Unknown error, please report!'
    527                  s_logger.info('"%s","%s", "caused unknown error with pin", "%s"' % (s_id,ref,pin))
    528528                break
    529529            if ok == 0:
     
    542542                else:
    543543                    student = getStudentByRegNo(self,ref)
    544                     s_logger.info('"%s","%s","successfully used pin","%s"' % (s_id,ref,pin))     
     544                    s_logger.info('"%s","%s","successfully used pin","%s"' % (s_id,ref,pin))
    545545                if student is None:
    546546                    err = "Student not found."
     
    560560                        s_logger.info('"%s","%s", "repeatedly activated service with pin", "%s"' % (s_id,ref,pin))   
    561561                        break
    562 ##                if self.reference == "jamb_reg_no":
    563 ##                    res = self.students_catalog(jamb_reg_no = ref)
    564 ##                    if len(res) > 0:
    565 ##                        err = "Please login with your Student Id %s and 10-digit PIN." % s_id
    566 ##                        s_logger.info("Student %s double checked Admission Pin %s" % (s_id,pin))
    567 ##                        break
    568562                try:
    569563                    student.getContent().makeStudentMember(s_id,password=pin[4:])
Note: See TracChangeset for help on using the changeset viewer.