##// END OF EJS Templates
cmdutil: use ui descriptors in makefileobj
Idan Kamara -
r14637:5e9d6912 default
parent child Browse files
Show More
@@ -160,7 +160,7 def makefileobj(repo, pat, node=None, to
160 writable = mode not in ('r', 'rb')
160 writable = mode not in ('r', 'rb')
161
161
162 if not pat or pat == '-':
162 if not pat or pat == '-':
163 fp = writable and sys.stdout or sys.stdin
163 fp = writable and repo.ui.fout or repo.ui.fin
164 return os.fdopen(os.dup(fp.fileno()), mode)
164 return os.fdopen(os.dup(fp.fileno()), mode)
165 if hasattr(pat, 'write') and writable:
165 if hasattr(pat, 'write') and writable:
166 return pat
166 return pat
General Comments 0
You need to be logged in to leave comments. Login now