mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-27 06:20:25 +00:00
Only do this on Python 3.
This commit is contained in:
parent
60acad32ca
commit
a2dab7c89f
@ -1,3 +1,4 @@
|
||||
from future.utils import PY3
|
||||
from past.builtins import unicode
|
||||
|
||||
import os
|
||||
@ -244,7 +245,7 @@ class Root(MultiFormatResource):
|
||||
static_dir = resource_filename("allmydata.web", "static")
|
||||
for filen in os.listdir(static_dir):
|
||||
child_path = filen
|
||||
if isinstance(filen, unicode):
|
||||
if PY3:
|
||||
child_path = filen.encode("utf-8")
|
||||
self.putChild(child_path, static.File(os.path.join(static_dir, filen)))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user