##// END OF EJS Templates
path-suboption: deprecated specifying the attributes as bytes...
marmoute -
r51802:35885dbd default
parent child Browse files
Show More
@@ -18,6 +18,7 b' from .. import ('
18 error,
18 error,
19 pycompat,
19 pycompat,
20 urllibcompat,
20 urllibcompat,
21 util,
21 )
22 )
22
23
23 from . import (
24 from . import (
@@ -681,6 +682,10 b' def pathsuboption(option, attr, display='
681 This decorator can be used to perform additional verification of
682 This decorator can be used to perform additional verification of
682 sub-options and to change the type of sub-options.
683 sub-options and to change the type of sub-options.
683 """
684 """
685 if isinstance(attr, bytes):
686 msg = b'pathsuboption take `str` as "attr" argument, not `bytes`'
687 util.nouideprecwarn(msg, b"6.6", stacklevel=2)
688 attr = attr.decode('ascii')
684
689
685 def register(func):
690 def register(func):
686 _pathsuboptions[option] = (attr, func)
691 _pathsuboptions[option] = (attr, func)
General Comments 0
You need to be logged in to leave comments. Login now