From bf32f7fe8aca2115aeca1b190d513f3465cd9bc7 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Thu, 28 Nov 2002 14:55:23 +0000 Subject: If the directory doesn't exist skip it. If not, it breaks when doing * pygtk.py (_get_available_versions): If the directory doesn't exist skip it. If not, it breaks when doing os.listdir. --- pygtk.py | 1 + 1 file changed, 1 insertion(+) (limited to 'pygtk.py') diff --git a/pygtk.py b/pygtk.py index 44304f5..c7ad1c2 100644 --- a/pygtk.py +++ b/pygtk.py @@ -29,6 +29,7 @@ def _get_available_versions(): versions = {} for dir in sys.path: if not dir: dir = os.getcwd() + if not os.path.exists(dir): continue if _pygtk_dir_pat.match(os.path.basename(dir)): continue # if the dir is a pygtk dir, skip it for filename in os.listdir(dir): -- cgit