Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/trunk' into nopipeline-8320-2
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkowl committed May 24, 2016
2 parents 981b2ed + 77d338b commit 3c4972d
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion docs/core/man/twistd.1
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ The uid to run as (default: don't change).
The gid to run as (default: don't change).
.TP
\fB--umask\fR \fI<mask>\fR
The (octal) file creation mask to apply. (default: 0o077 for daemons, no
The (octal) file creation mask to apply. (default: 0077 for daemons, no
change otherwise).
.TP
\fB\-r\fR, \fB\--reactor\fR \fI<reactor>\fR
Expand Down
20 changes: 10 additions & 10 deletions twisted/conch/insults/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,33 +409,33 @@ def render(self, width, height, terminal):
def horizontalLine(terminal, y, left, right):
terminal.selectCharacterSet(insults.CS_DRAWING, insults.G0)
terminal.cursorPosition(left, y)
terminal.write(chr(0o161) * (right - left))
terminal.write(chr(0161) * (right - left))
terminal.selectCharacterSet(insults.CS_US, insults.G0)

def verticalLine(terminal, x, top, bottom):
terminal.selectCharacterSet(insults.CS_DRAWING, insults.G0)
for n in xrange(top, bottom):
terminal.cursorPosition(x, n)
terminal.write(chr(0o170))
terminal.write(chr(0170))
terminal.selectCharacterSet(insults.CS_US, insults.G0)


def rectangle(terminal, (top, left), (width, height)):
terminal.selectCharacterSet(insults.CS_DRAWING, insults.G0)

terminal.cursorPosition(top, left)
terminal.write(chr(0o154))
terminal.write(chr(0o161) * (width - 2))
terminal.write(chr(0o153))
terminal.write(chr(0154))
terminal.write(chr(0161) * (width - 2))
terminal.write(chr(0153))
for n in range(height - 2):
terminal.cursorPosition(left, top + n + 1)
terminal.write(chr(0o170))
terminal.write(chr(0170))
terminal.cursorForward(width - 2)
terminal.write(chr(0o170))
terminal.write(chr(0170))
terminal.cursorPosition(0, top + height - 1)
terminal.write(chr(0o155))
terminal.write(chr(0o161) * (width - 2))
terminal.write(chr(0o152))
terminal.write(chr(0155))
terminal.write(chr(0161) * (width - 2))
terminal.write(chr(0152))

terminal.selectCharacterSet(insults.CS_US, insults.G0)

Expand Down
2 changes: 1 addition & 1 deletion twisted/conch/test/test_filetransfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def setUp(self):
f = file(os.path.join(self.testDir, 'testfile1'),'w')
f.write('a'*10+'b'*10)
f.write(file('/dev/urandom').read(1024*64)) # random data
os.chmod(os.path.join(self.testDir, 'testfile1'), 0o644)
os.chmod(os.path.join(self.testDir, 'testfile1'), 0644)
file(os.path.join(self.testDir, 'testRemoveFile'), 'w').write('a')
file(os.path.join(self.testDir, 'testRenameFile'), 'w').write('a')
file(os.path.join(self.testDir, '.testHiddenFile'), 'w').write('a')
Expand Down
6 changes: 3 additions & 3 deletions twisted/conch/test/test_openssh_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ def test_getPrivateKeysAsRoot(self):
"""
keyFile = self.keysDir.child("ssh_host_two_key")
# Fake permission error by changing the mode
keyFile.chmod(0o000)
self.addCleanup(keyFile.chmod, 0o777)
keyFile.chmod(0000)
self.addCleanup(keyFile.chmod, 0777)
# And restore the right mode when seteuid is called
savedSeteuid = os.seteuid
def seteuid(euid):
keyFile.chmod(0o777)
keyFile.chmod(0777)
return savedSeteuid(euid)
self.patch(os, "seteuid", seteuid)
keys = self.factory.getPrivateKeys()
Expand Down
2 changes: 1 addition & 1 deletion twisted/conch/unix.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def __init__(self, server, filename, flags, attrs):
mode = attrs["permissions"]
del attrs["permissions"]
else:
mode = 0o777
mode = 0777
fd = server.avatar._runAsUser(os.open, filename, openFlags, mode)
if attrs:
server.avatar._runAsUser(server._setAttrs, filename, attrs)
Expand Down
8 changes: 4 additions & 4 deletions twisted/mail/maildir.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ def initializeMaildir(dir):
@param dir: The path name for a user directory.
"""
if not os.path.isdir(dir):
os.mkdir(dir, 0o700)
os.mkdir(dir, 0700)
for subdir in ['new', 'cur', 'tmp', '.Trash']:
os.mkdir(os.path.join(dir, subdir), 0o700)
os.mkdir(os.path.join(dir, subdir), 0700)
for subdir in ['new', 'cur', 'tmp']:
os.mkdir(os.path.join(dir, '.Trash', subdir), 0o700)
os.mkdir(os.path.join(dir, '.Trash', subdir), 0700)
# touch
open(os.path.join(dir, '.Trash', 'maildirfolder'), 'w').close()

Expand Down Expand Up @@ -484,7 +484,7 @@ def createTempFile(self):
while True:
self.tmpname = os.path.join(self.mbox.path, "tmp", _generateMaildirName())
try:
self.fh = self.osopen(self.tmpname, attr, 0o600)
self.fh = self.osopen(self.tmpname, attr, 0600)
return None
except OSError:
tries += 1
Expand Down
2 changes: 1 addition & 1 deletion twisted/mail/test/test_mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -1986,7 +1986,7 @@ def test_processAlias(self):
while read i; do
echo $i >> process.alias.out
done""")
os.chmod(sh.path, 0o700)
os.chmod(sh.path, 0700)
a = mail.alias.ProcessAlias(sh.path, None, None)
m = a.createMessageReceiver()

Expand Down
8 changes: 4 additions & 4 deletions twisted/test/test_ftp.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ def test_LISTUnicode(self):
return self._listTestHelper(
"LIST",
(u'my resum\xe9', (
0, 1, filepath.Permissions(0o777), 0, 0, 'user', 'group')),
0, 1, filepath.Permissions(0777), 0, 0, 'user', 'group')),
'drwxrwxrwx 0 user group '
'0 Jan 01 1970 my resum\xc3\xa9\r\n')

Expand All @@ -893,7 +893,7 @@ def test_LISTNonASCIIBytes(self):
return self._listTestHelper(
"LIST",
('my resum\xc3\xa9', (
0, 1, filepath.Permissions(0o777), 0, 0, 'user', 'group')),
0, 1, filepath.Permissions(0777), 0, 0, 'user', 'group')),
'drwxrwxrwx 0 user group '
'0 Jan 01 1970 my resum\xc3\xa9\r\n')

Expand Down Expand Up @@ -990,7 +990,7 @@ def test_NLSTUnicode(self):
return self._listTestHelper(
"NLST",
(u'my resum\xe9', (
0, 1, filepath.Permissions(0o777), 0, 0, 'user', 'group')),
0, 1, filepath.Permissions(0777), 0, 0, 'user', 'group')),
'my resum\xc3\xa9\r\n')


Expand All @@ -1001,7 +1001,7 @@ def test_NLSTNonASCIIBytes(self):
return self._listTestHelper(
"NLST",
('my resum\xc3\xa9', (
0, 1, filepath.Permissions(0o777), 0, 0, 'user', 'group')),
0, 1, filepath.Permissions(0777), 0, 0, 'user', 'group')),
'my resum\xc3\xa9\r\n')


Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions twisted/words/protocols/irc.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
from twisted.python import log, reflect, _textattributes

NUL = chr(0)
CR = chr(0o15)
NL = chr(0o12)
CR = chr(015)
NL = chr(012)
LF = NL
SPC = chr(0o40)
SPC = chr(040)

# This includes the CRLF terminator characters.
MAX_COMMAND_LENGTH = 512
Expand Down Expand Up @@ -3633,7 +3633,7 @@ def stripFormatting(text):

# CTCP constants and helper functions

X_DELIM = chr(0o01)
X_DELIM = chr(001)

def ctcpExtract(message):
"""
Expand Down Expand Up @@ -3677,7 +3677,7 @@ def ctcpExtract(message):

# CTCP escaping

M_QUOTE= chr(0o20)
M_QUOTE= chr(020)

mQuoteTable = {
NUL: M_QUOTE + '0',
Expand Down

0 comments on commit 3c4972d

Please sign in to comment.