From 263f57e87b7abca9980b86f22459bd9942ccbc5e Mon Sep 17 00:00:00 2001 From: david Date: Fri, 18 May 2012 16:34:39 +0000 Subject: [PATCH] Placeholder for sys.path augmentation. --- zenmap/zenmap | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zenmap/zenmap b/zenmap/zenmap index f2b2ccfdc..ae9894ee2 100755 --- a/zenmap/zenmap +++ b/zenmap/zenmap @@ -133,6 +133,13 @@ def is_secure_dir(path, num_symlinks = 0): return True +# Add the install_lib directory to sys.path, the list of directories searched +# for modules, but don't do it if the directory or its parents may be writable +# by other users. The following line is replaced by the installation program. +INSTALL_LIB = None +if INSTALL_LIB is not None and is_secure_dir(INSTALL_LIB): + sys.path.append(INSTALL_LIB) + import zenmapGUI.App if __name__ == '__main__':