python - how to continue execution after sys.exit() command -


here i'm reading , comparing values 2 logs using 'for' loop.problem i'm not able continue next tc after sys.exit command. let me know if required more clarification

f = open('/tmp/ftplog', 'r')     line in f:         m = re.findall("5\d+", line)         #print m         fd = open('/tmp/tellog', 'r')         line in fd:             n = re.findall(r"5\d+", line)             #print n             if  m == n:                               print "passed"              sys.exit()    ####tc-02####  def tc02(ipadrr,login,password,ftpipaddr,ftplogin,ftppassword,ftpfilename):      try:                      telconn2 = pexpect.spawn(ipadrr) 

try

print "passed" 

return ####instead of sys.exit use return


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -