Commits

Jan Brohl committed a975d88

keys unterstüthern falls vorhanden

  • Participants
  • Parent commits fb48f30

Comments (0)

Files changed (1)

src/simplerest/util.py

                                self.path_as_list,
                                ", ".join("%r=%r" % kv for kv in self._kwargs.items()))
 
+    def keys(self):
+        return self["keys"]()()
+
 
 class TALVirtualPath(VirtualPath):
     _forbidden = re.compile("[.]|(.*([/]|[|]|[?]|[\\\\]).*)+")
         return list(self.kwarg("basepath") or []) + self._path
 
     def __getitem__(self, key):
-        if self._forbidden.match(key):
+        if isinstance(key, basestring) and self._forbidden.match(key):
             raise KeyError(key)
         elif key == "container":
             p = self.path_as_list
 
     def __str__(self):
         return str(self._vp)
+
+    def __getattr__(self, name):
+        return getattr(self._vp, name)