Changeset: 3f4ee4dc6315 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3f4ee4dc6315 Modified Files: testing/Mtest.py.in Branch: Oct2012 Log Message:
Fix testing for Windows. socket.AF_UNIX gives an AtributeError, so catch that. Also, any assignment, even in untaken branches, cause a variable to become local. diffs (30 lines): diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in --- a/testing/Mtest.py.in +++ b/testing/Mtest.py.in @@ -3145,13 +3145,13 @@ if sys.platform == 'linux2' and CONDITIO RELEASE = "5.2" # see if we can use UNIX sockets -SOCK = False try: server = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) +except (socket.error, AttributeError): + # apparently not + SOCK = False +else: SOCK = True -except socket.error, (Serrno,Serrstr): - # apparently not - pass if SYST == "Linux": # Please keep this aligned / in sync with configure.ag ! @@ -3732,7 +3732,7 @@ def main(argv) : # if no revision known, can't refer to repository URLPREFIX = None - global SOCK + global SOCK, HOST if SOCK: SOCK = "--set mapi_usock=%s/.s.monetdb.%s" % \ (env['GDK_DBFARM'], env['MAPIPORT']) _______________________________________________ checkin-list mailing list checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list