|
3 | 3 | ### |
4 | 4 | # Copyright (c) 2002-2005, Jeremiah Fincher |
5 | 5 | # Copyright (c) 2011, James McCoy |
6 | | -# Copyright (c) 2010-2021, Valentin Lorentz |
| 6 | +# Copyright (c) 2010-2026, Valentin Lorentz |
7 | 7 | # All rights reserved. |
8 | 8 | # |
9 | 9 | # Redistribution and use in source and binary forms, with or without |
|
34 | 34 | import os |
35 | 35 | import sys |
36 | 36 | import time |
| 37 | +import codecs |
37 | 38 | import shutil |
38 | 39 | import fnmatch |
39 | 40 | from tempfile import TemporaryDirectory |
|
50 | 51 | os.makedirs(os.path.join(main_temp_dir.name, 'data')) |
51 | 52 | os.makedirs(os.path.join(main_temp_dir.name, 'logs')) |
52 | 53 |
|
| 54 | +encoder = codecs.getencoder("unicode_escape") |
| 55 | + |
53 | 56 | registryFilename = os.path.join(main_temp_dir.name, 'conf', 'test.conf') |
54 | 57 | with open(registryFilename, 'w') as fd: |
55 | 58 | fd.write(""" |
|
72 | 75 | supybot.nick: test |
73 | 76 | supybot.databases.users.allowUnregistration: True |
74 | 77 | """.format( |
75 | | - temp_conf=os.path.join(main_temp_dir.name, 'conf'), |
76 | | - temp_data=os.path.join(main_temp_dir.name, 'data'), |
77 | | - temp_logs=os.path.join(main_temp_dir.name, 'logs') |
| 78 | + temp_conf=encoder(os.path.join(main_temp_dir.name, 'conf'))[0].decode(), |
| 79 | + temp_data=encoder(os.path.join(main_temp_dir.name, 'data'))[0].decode(), |
| 80 | + temp_logs=encoder(os.path.join(main_temp_dir.name, 'logs'))[0].decode(), |
78 | 81 | )) |
79 | 82 |
|
80 | 83 | import supybot.registry as registry |
|
0 commit comments