diff data_generation/transformations/pycaptcha/Captcha/File.py @ 184:81f8466dc121

Transient exception handling in captchas (ie. lorsque le NFS est temporairement inaccessible)
author boulanni <nicolas_boulanger@hotmail.com>
date Sat, 27 Feb 2010 19:26:26 -0500
parents 1f5937e9e530
children 7800be7bce66
line wrap: on
line diff
--- a/data_generation/transformations/pycaptcha/Captcha/File.py	Sat Feb 27 19:21:57 2010 -0500
+++ b/data_generation/transformations/pycaptcha/Captcha/File.py	Sat Feb 27 19:26:26 2010 -0500
@@ -36,7 +36,10 @@
         """From our given file list, find a list of full paths to files"""
         paths = []
         for name in self.fileList:
-            path = os.path.join(dataDir, self.basePath, name)
+            if name[0] == '/':
+                path = name
+            else:
+                path = os.path.join(dataDir, self.basePath, name)
             if os.path.isdir(path):
                 for content in os.listdir(path):
                     if self._checkExtension(content):