1. Bastian Blank
  2. wsgiwar2013

Commits

Bastian Blank  committed 83ebb28

More comments

  • Participants
  • Parent commits 3000378
  • Branches master

Comments (0)

Files changed (2)

File bepasty/storage/ceph/__init__.py

View file
  • Ignore whitespace
         app.storage = self
 
     def _before_request(self):
+        """
+        Open ioctx for data and meta-data storage.
+        """
         g.ceph_ioctx_data = self.__cluster[self.pool_data]
         g.ceph_ioctx_data.open()
 
             g.ceph_ioctx_meta = None
 
     def _teardown_request(self, exc):
+        """
+        Close ioctx for data and meta-data storage.
+        """
         del g.ceph_ioctx_data
         del g.ceph_ioctx_meta
 

File bepasty/utils/html.py

View file
  • Ignore whitespace
 
 
 class ContentRange(collections.namedtuple('ContentRange', ('begin', 'end', 'complete'))):
+    """
+    Work with Content-Range headers.
+    """
     __slots__ = ()
 
     @classmethod
 
     @classmethod
     def from_request(cls):
+        """
+        Read Content-Range from request and parse it
+        """
         content_range = request.headers.get('Content-Range')
         if content_range is not None:
             return cls.parse(content_range)