##// END OF EJS Templates
util: replace util.nulldev with os.devnull...
Ross Lagerwall -
r17391:fc24c104 stable
parent child Browse files
Show More
@@ -276,9 +276,9 b' class commandline(object):'
276 276 pass
277 277 cmdline = [util.shellquote(arg) for arg in cmdline]
278 278 if not self.ui.debugflag:
279 cmdline += ['2>', util.nulldev]
279 cmdline += ['2>', os.devnull]
280 280 if closestdin:
281 cmdline += ['<', util.nulldev]
281 cmdline += ['<', os.devnull]
282 282 cmdline = ' '.join(cmdline)
283 283 return cmdline
284 284
@@ -184,7 +184,7 b' class gnuarch_source(converter_source, c'
184 184 cmdline = [self.execmd, cmd]
185 185 cmdline += args
186 186 cmdline = [util.shellquote(arg) for arg in cmdline]
187 cmdline += ['>', util.nulldev, '2>', util.nulldev]
187 cmdline += ['>', os.devnull, '2>', os.devnull]
188 188 cmdline = util.quotecommand(' '.join(cmdline))
189 189 self.ui.debug(cmdline, '\n')
190 190 return os.system(cmdline)
@@ -515,7 +515,7 b' def service(opts, parentfn=None, initfn='
515 515 sys.stdout.flush()
516 516 sys.stderr.flush()
517 517
518 nullfd = os.open(util.nulldev, os.O_RDWR)
518 nullfd = os.open(os.devnull, os.O_RDWR)
519 519 logfilefd = nullfd
520 520 if logfile:
521 521 logfilefd = os.open(logfile, os.O_RDWR | os.O_CREAT | os.O_APPEND)
@@ -10,7 +10,6 b' import encoding'
10 10 import os, sys, errno, stat, getpass, pwd, grp, tempfile, unicodedata
11 11
12 12 posixfile = open
13 nulldev = '/dev/null'
14 13 normpath = os.path.normpath
15 14 samestat = os.path.samestat
16 15 oslink = os.link
@@ -45,7 +45,6 b' makedir = platform.makedir'
45 45 nlinks = platform.nlinks
46 46 normpath = platform.normpath
47 47 normcase = platform.normcase
48 nulldev = platform.nulldev
49 48 openhardlinks = platform.openhardlinks
50 49 oslink = platform.oslink
51 50 parsepatchoutput = platform.parsepatchoutput
@@ -24,7 +24,6 b' termwidth = win32.termwidth'
24 24 testpid = win32.testpid
25 25 unlink = win32.unlink
26 26
27 nulldev = 'NUL:'
28 27 umask = 0022
29 28
30 29 # wrap osutil.posixfile to provide friendlier exceptions
@@ -174,7 +173,7 b" def popen(command, mode='r'):"
174 173 # Work around "popen spawned process may not write to stdout
175 174 # under windows"
176 175 # http://bugs.python.org/issue1366
177 command += " 2> %s" % nulldev
176 command += " 2> %s" % os.devnull
178 177 return os.popen(quotecommand(command), mode)
179 178
180 179 def explainexit(code):
General Comments 0
You need to be logged in to leave comments. Login now