From fc373f54147e79c6b9938b7e1aff2713da5628b9 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Tue, 26 Aug 2008 14:35:16 +0000 Subject: Fixed minor bug in exe availability checking in run.py git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2239 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip-apps/src/test-pjsua/run.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'pjsip-apps') diff --git a/pjsip-apps/src/test-pjsua/run.py b/pjsip-apps/src/test-pjsua/run.py index 58a45a85..092e222b 100644 --- a/pjsip-apps/src/test-pjsua/run.py +++ b/pjsip-apps/src/test-pjsua/run.py @@ -61,12 +61,18 @@ inc.ARGS = args if G_EXE == "": if sys.platform.find("win32")!=-1: e = "../../bin/pjsua_vc6d.exe" - st1 = os.stat(e) + if os.access(e, os.F_OK): + st1 = os.stat(e) + else: + st1 = None if st1 != None: G_EXE = e - e = "../../bin/pjsua_vc6d.exe" - st2 = os.stat(e) - if st2 != None and st2.st_mtime > st1.st_mtime: + e = "../../bin/pjsua_vc6.exe" + if os.access(e, os.F_OK): + st2 = os.stat(e) + else: + st2 = None + if st2 != None and (st1==None or st2.st_mtime > st1.st_mtime): G_EXE = e st1 = st2 if G_EXE=="": -- cgit v1.2.3