Changeset e113cba in trunk
- Timestamp:
- 2020-08-13T19:02:59Z (5 years ago)
- Branches:
- master
- Children:
- 2157da52
- Parents:
- 7505abe8
- git-author:
- Itamar Turner-Trauring <itamar@…> (2020-08-13 19:02:49)
- git-committer:
- Itamar Turner-Trauring <itamar@…> (2020-08-13 19:02:59)
- Location:
- src/allmydata
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/allmydata/test/test_encodingutil.py ¶
r7505abe8 re113cba 54 54 open(os.path.join(tmpdir, fname), 'w').close() 55 55 56 # Use Unicode API under Windows or MacOS X 56 # On Python 2, listing directories returns unicode under Windows or 57 # MacOS X if the input is unicode. On Python 3, it always returns 58 # Unicode. 57 59 if PY2 and sys.platform in ('win32', 'darwin'): 58 60 dirlist = os.listdir(unicode(tmpdir)) -
TabularUnified src/allmydata/util/encodingutil.py ¶
r7505abe8 re113cba 215 215 216 216 def _str_escape(m, quote_newlines): # TODO rename to _bytes_escape 217 """ 218 Takes a re match on bytes, the result is escaped bytes of group(0). 219 """ 217 220 c = m.group(0) 218 221 if c == b'"' or c == b'$' or c == b'`' or c == b'\\':
Note: See TracChangeset
for help on using the changeset viewer.