From: g0dil Date: Mon, 8 Feb 2010 22:28:51 +0000 (+0000) Subject: Add try/except to SConstruct senf search expression X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=7225d467b3ceaf96bce7ec914a88acb9608c2f5e;p=senf.git Add try/except to SConstruct senf search expression git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1574 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Examples/MCSniffer/SConstruct b/Examples/MCSniffer/SConstruct index 2652d43..b0edf7c 100644 --- a/Examples/MCSniffer/SConstruct +++ b/Examples/MCSniffer/SConstruct @@ -1,7 +1,9 @@ # -*- python -*- - import sys, os, os.path -sys.path.append(((_ for _ in (os.path.join(os.path.sep.join(('..' for _ in range(_))),d,'site_scons') for d in ('','senf','Senf') for _ in range(len(os.getcwd().split('/')))) if os.path.exists(_))).next()) +try: sys.path.append(((_ for _ in (os.path.join(os.path.sep.join(('..' for _ in range(_))),d, + 'site_scons') for d in ('','senf','Senf') for _ in range(len(os.getcwd().split('/')))) + if os.path.exists(_))).next()) +except: pass import senfutil env = Environment() diff --git a/Examples/MultiMCLoop/SConstruct b/Examples/MultiMCLoop/SConstruct index 611677d..c1f79a3 100644 --- a/Examples/MultiMCLoop/SConstruct +++ b/Examples/MultiMCLoop/SConstruct @@ -1,7 +1,9 @@ # -*- python -*- - import sys, os, os.path -sys.path.append(((_ for _ in (os.path.join(os.path.sep.join(('..' for _ in range(_))),d,'site_scons') for d in ('','senf','Senf') for _ in range(len(os.getcwd().split('/')))) if os.path.exists(_))).next()) +try: sys.path.append(((_ for _ in (os.path.join(os.path.sep.join(('..' for _ in range(_))),d, + 'site_scons') for d in ('','senf','Senf') for _ in range(len(os.getcwd().split('/')))) + if os.path.exists(_))).next()) +except: pass import senfutil env = Environment() diff --git a/Examples/RateStuffer/SConstruct b/Examples/RateStuffer/SConstruct index c4dcb0c..0957455 100644 --- a/Examples/RateStuffer/SConstruct +++ b/Examples/RateStuffer/SConstruct @@ -1,7 +1,9 @@ # -*- python -*- - import sys, os, os.path -sys.path.append(((_ for _ in (os.path.join(os.path.sep.join(('..' for _ in range(_))),d,'site_scons') for d in ('','senf','Senf') for _ in range(len(os.getcwd().split('/')))) if os.path.exists(_))).next()) +try: sys.path.append(((_ for _ in (os.path.join(os.path.sep.join(('..' for _ in range(_))),d, + 'site_scons') for d in ('','senf','Senf') for _ in range(len(os.getcwd().split('/')))) + if os.path.exists(_))).next()) +except: pass import senfutil env = Environment() diff --git a/Examples/Sniffer/SConstruct b/Examples/Sniffer/SConstruct index 6f3a70e..691495f 100644 --- a/Examples/Sniffer/SConstruct +++ b/Examples/Sniffer/SConstruct @@ -1,7 +1,9 @@ # -*- python -*- - import sys, os, os.path -sys.path.append(((_ for _ in (os.path.join(os.path.sep.join(('..' for _ in range(_))),d,'site_scons') for d in ('','senf','Senf') for _ in range(len(os.getcwd().split('/')))) if os.path.exists(_))).next()) +try: sys.path.append(((_ for _ in (os.path.join(os.path.sep.join(('..' for _ in range(_))),d, + 'site_scons') for d in ('','senf','Senf') for _ in range(len(os.getcwd().split('/')))) + if os.path.exists(_))).next()) +except: pass import senfutil env = Environment() diff --git a/Examples/TCPClientServer/SConstruct b/Examples/TCPClientServer/SConstruct index c5fc004..56ff534 100644 --- a/Examples/TCPClientServer/SConstruct +++ b/Examples/TCPClientServer/SConstruct @@ -1,7 +1,9 @@ # -*- python -*- - import sys, os, os.path -sys.path.append(((_ for _ in (os.path.join(os.path.sep.join(('..' for _ in range(_))),d,'site_scons') for d in ('','senf','Senf') for _ in range(len(os.getcwd().split('/')))) if os.path.exists(_))).next()) +try: sys.path.append(((_ for _ in (os.path.join(os.path.sep.join(('..' for _ in range(_))),d, + 'site_scons') for d in ('','senf','Senf') for _ in range(len(os.getcwd().split('/')))) + if os.path.exists(_))).next()) +except: pass import senfutil env = Environment() diff --git a/Examples/UDPClientServer/SConstruct b/Examples/UDPClientServer/SConstruct index 1dab834..9413402 100644 --- a/Examples/UDPClientServer/SConstruct +++ b/Examples/UDPClientServer/SConstruct @@ -1,7 +1,9 @@ # -*- python -*- - import sys, os, os.path -sys.path.append(((_ for _ in (os.path.join(os.path.sep.join(('..' for _ in range(_))),d,'site_scons') for d in ('','senf','Senf') for _ in range(len(os.getcwd().split('/')))) if os.path.exists(_))).next()) +try: sys.path.append(((_ for _ in (os.path.join(os.path.sep.join(('..' for _ in range(_))),d, + 'site_scons') for d in ('','senf','Senf') for _ in range(len(os.getcwd().split('/')))) + if os.path.exists(_))).next()) +except: pass import senfutil env = Environment() diff --git a/SConstruct b/SConstruct index 33f2dec..cce33f0 100644 --- a/SConstruct +++ b/SConstruct @@ -1,7 +1,5 @@ # -*- python -*- -from __future__ import with_statement - import sys, os.path, fnmatch import SENFSCons, senfutil, senfconf