server/sources/storages.py
changeset 5398 b9e1abe1bdfe
parent 5397 cdbf823450aa
child 5423 e15abfdcce38
equal deleted inserted replaced
5397:cdbf823450aa 5398:b9e1abe1bdfe
    72     for i in xrange(1, 256):
    72     for i in xrange(1, 256):
    73         path = '%s%s%s' % (base, i, ext)
    73         path = '%s%s%s' % (base, i, ext)
    74         if not osp.isfile(path):
    74         if not osp.isfile(path):
    75             return path
    75             return path
    76     return None
    76     return None
       
    77 
    77 
    78 
    78 class BytesFileSystemStorage(Storage):
    79 class BytesFileSystemStorage(Storage):
    79     """store Bytes attribute value on the file system"""
    80     """store Bytes attribute value on the file system"""
    80     def __init__(self, defaultdir, fsencoding='utf-8'):
    81     def __init__(self, defaultdir, fsencoding='utf-8'):
    81         self.default_directory = defaultdir
    82         self.default_directory = defaultdir