Mercurial > p > roundup > code
diff roundup/backends/blobfiles.py @ 5492:6b0c542642be
blobfiles now always stores/returns bytes
any conversation is done in the backend layer
added a special "binary_content" property to read the data as bytes
changed history generation to read property data on demand
| author | Christof Meerwald <cmeerw@cmeerw.org> |
|---|---|
| date | Sun, 12 Aug 2018 16:05:42 +0100 |
| parents | 46317fe544ec |
| children | 3175bb92ca28 |
line wrap: on
line diff
--- a/roundup/backends/blobfiles.py Mon Aug 06 20:52:15 2018 +0100 +++ b/roundup/backends/blobfiles.py Sun Aug 12 16:05:42 2018 +0100 @@ -22,8 +22,6 @@ import os -from roundup.anypy.strings import s2b - def files_in_dir(dir): if not os.path.exists(dir): return 0 @@ -334,8 +332,6 @@ # in multi-tracker (i.e. multi-umask) or modpython scenarios # the umask may have changed since last we set it. os.umask(self.umask) - if isinstance(content, str): - content = s2b(content) open(name, 'wb').write(content) def getfile(self, classname, nodeid, property):
