##// END OF EJS Templates
lfs: use str for the open() mode when opening a blob for py3...
lfs: use str for the open() mode when opening a blob for py3 The other fix for this was to leave the mode as bytes, and import `pycompat.open()` like a bunch of other modules do. But I think it's confusing to still use bytes at the python boundary, and obviously error prone. Grepping for ` open\(.+, ['"][a-z]+['"]\)` and ` open\(.+, b['"][a-z]+['"]\)` outside of `tests`, there are 51 and 87 uses respectively, so it's not like this is a rare direct usage. Differential Revision: https://phab.mercurial-scm.org/D8099

File last commit:

r43346:2372284d default
r44776:234001d2 default
Show More
error.py
15 lines | 413 B | text/x-python | PythonLexer
# Copyright 2016-present Facebook. All Rights Reserved.
#
# error: errors used in fastannotate
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from __future__ import absolute_import
class CorruptedFileError(Exception):
pass
class CannotReuseError(Exception):
"""cannot reuse or update the cache incrementally"""