Changeset e113cba in trunk


Ignore:
Timestamp:
2020-08-13T19:02:59Z (5 years ago)
Author:
Itamar Turner-Trauring <itamar@…>
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)
Message:

Address review comments.

Location:
src/allmydata
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/allmydata/test/test_encodingutil.py

    r7505abe8 re113cba  
    5454            open(os.path.join(tmpdir, fname), 'w').close()
    5555
    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.
    5759        if PY2 and sys.platform in ('win32', 'darwin'):
    5860            dirlist = os.listdir(unicode(tmpdir))
  • TabularUnified src/allmydata/util/encodingutil.py

    r7505abe8 re113cba  
    215215
    216216def _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    """
    217220    c = m.group(0)
    218221    if c == b'"' or c == b'$' or c == b'`' or c == b'\\':
Note: See TracChangeset for help on using the changeset viewer.