示例#1
0
    def __call__(self, value, *args, **kwargs):
        path=makePathAbsolute(cleanPath(value))

        try:
            if not isDirectory(path):
                return "Not a directory"
        except OSError, e:
            return e.strerror
示例#2
0
    def __call__(self, value, *args, **kwargs):
        path = makePathAbsolute(cleanPath(value))

        try:
            if not isDirectory(path):
                return "Not a directory"
        except OSError, e:
            return e.strerror
示例#3
0
 def testAbsolution(self):
     self.assertEqual(makePathAbsolute(""), self.home)
     self.assertEqual(makePathAbsolute("/tmp"), "/tmp")
示例#4
0
 def getFilesystemPath(self):
     relpath = self.getRelativePath()
     if not relpath:
         raise AttributeError
     return makePathAbsolute(relpath)
示例#5
0
 def testAbsolution(self):
     self.assertEqual(makePathAbsolute(""), self.home)
     self.assertEqual(makePathAbsolute("/tmp"), "/tmp")