python-modernize -f lib2to3.fixes.fix_numliterals . -w

This commit is contained in:
Tomas Kopecek 2017-10-31 16:07:34 +01:00
parent 379ec8ae63
commit 1f6ca9ae72
2 changed files with 3 additions and 3 deletions

View file

@ -8916,7 +8916,7 @@ class RootExports(object):
# but we allow .log files to be uploaded multiple times to support
# realtime log-file viewing
raise koji.GenericError("file already exists: %s" % fn)
fd = os.open(fn, os.O_RDWR | os.O_CREAT, 0666)
fd = os.open(fn, os.O_RDWR | os.O_CREAT, 0o666)
# log_error("fd=%r" %fd)
try:
if offset == 0 or (offset == -1 and size == len(contents)):
@ -12686,7 +12686,7 @@ def handle_upload(environ):
size = 0
chksum = sum_cls()
inf = environ['wsgi.input']
fd = os.open(fn, os.O_RDWR | os.O_CREAT, 0666)
fd = os.open(fn, os.O_RDWR | os.O_CREAT, 0o666)
try:
try:
fcntl.lockf(fd, fcntl.LOCK_EX|fcntl.LOCK_NB)

View file

@ -111,7 +111,7 @@ def log_output(session, path, args, outfile, uploadpath, cwd=None, logerror=0, a
flags = os.O_CREAT | os.O_WRONLY
if append:
flags |= os.O_APPEND
fd = os.open(outfile, flags, 0666)
fd = os.open(outfile, flags, 0o666)
os.dup2(fd, 1)
if logerror:
os.dup2(fd, 2)