Commits

Christian Scholz committed 1d0ce0c

added get()

Comments (0)

Files changed (1)

quantumcore/storages/filesystem.py

         It basically means joining the base path and the filename"""
         return os.path.join(self.root_path, filename)
     
-    def __getitem__(self, filename):
+    def get(self, filename):
         """return the file with the given filename as a file pointer"""
         full_filename = os.path.join(self.root_path, filename)
         if not os.path.isfile(full_filename):
             raise KeyError(filename)
         return open(full_filename,"rb")
+    
+    __getitem__ = get
 
     def delete(self, filename):
         """delete the file identified by ``filename``"""