File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change 3333defenc = sys .getfilesystemencoding ()
3434
3535if PY3 :
36- import io
37- FileType = io .IOBase
38-
3936 def byte_ord (b ):
4037 return b
4138
@@ -49,9 +46,6 @@ def mviter(d):
4946 unicode = str
5047 binary_type = bytes
5148else :
52- FileType = file # @UndefinedVariable on PY3
53- # usually, this is just ascii, which might not enough for our encoding needs
54- # Unless it's set specifically, we override it to be utf-8
5549 if defenc == 'ascii' :
5650 defenc = 'utf-8'
5751 byte_ord = ord
Original file line number Diff line number Diff line change 99import abc
1010from functools import wraps
1111import inspect
12+ from io import IOBase
1213import logging
1314import os
1415import re
1516from collections import OrderedDict
1617
1718from git .compat import (
1819 string_types ,
19- FileType ,
2020 defenc ,
2121 force_text ,
2222 with_metaclass ,
@@ -581,7 +581,7 @@ def write(self):
581581 fp = self ._file_or_files
582582
583583 # we have a physical file on disk, so get a lock
584- is_file_lock = isinstance (fp , string_types + (FileType , ))
584+ is_file_lock = isinstance (fp , string_types + (IOBase , ))
585585 if is_file_lock :
586586 self ._lock ._obtain_lock ()
587587 if not hasattr (fp , "seek" ):
You can’t perform that action at this time.
0 commit comments