]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix skip logic in t_otp.py
authorGreg Hudson <ghudson@mit.edu>
Thu, 11 Jul 2013 23:44:11 +0000 (19:44 -0400)
committerGreg Hudson <ghudson@mit.edu>
Thu, 11 Jul 2013 23:44:11 +0000 (19:44 -0400)
Reorder (and trim) the imports in t_otp.py so that k5test is pulled in
before we try to import pyrad and multiprocessing.  Otherwise
success() isn't defined in the case where we decide to skip the entire
test script.

src/tests/t_otp.py

index 66a03ee573146207f75148cd63b1beecb7a37ef4..0aeb692e46dabae4fb6715b77150e41d30f2f198 100644 (file)
 # test how OTP handles the case of short daemon restarts.
 #
 
+from k5test import *
 from Queue import Empty
 import StringIO
 import struct
-import subprocess
-import sys
-import socket
-import os
-import atexit
 
 try:
     from pyrad import packet, dictionary
@@ -46,8 +42,6 @@ except ImportError:
     success('Warning: skipping OTP tests due to missing pyrad or old Python')
     exit(0)
 
-from k5test import *
-
 class RadiusDaemon(Process):
     MAX_PACKET_SIZE = 4096