-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misc style fixes #1340
Misc style fixes #1340
Conversation
QuotedString, Word, ZeroOrMore, alphanums, nums, oneOf | ||
|
||
from .errors import * | ||
from pyparsing import Combine, Forward, Group, Literal, nestedExpr, \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Black would make changes.
@@ -109,7 +109,7 @@ def reqError(self, req, error): | |||
# print 'error', error | |||
|
|||
def setupReqs(self): | |||
for i in range(0, self.concurrent_reqs): # make the initial pool of requests | |||
for _i in range(0, self.concurrent_reqs): # make the initial pool of requests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (86 > 79 characters)
@@ -354,7 +353,7 @@ def test_vrf_add_list(self): | |||
self.assertEqual(self._mangle_vrf_result(s.list_vrf({ 'auth': ad, 'vrf': { 'id': vrf['id'] } })), [ ref, ]) | |||
|
|||
attr['rt'] = '123:abc' | |||
with self.assertRaisesRegex(xmlrpc.client.Fault, '.'): # TODO: specify exception string | |||
with self.assertRaisesRegex(xmlrpc.client.Fault, '.'): # TODO: specify exception string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (96 > 79 characters)
# _exit is like exit(), but it doesn't call any functions registered | ||
# with atexit (and on_exit) or any registered signal handlers. It also | ||
# closes any open file descriptors. Using exit() may cause all stdio | ||
# streams to be flushed twice and any temporary files may be unexpectedly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
# shutdown time by changing it to the root directory. | ||
os.chdir(WORKDIR) | ||
# We probably don't want the file mode creation mask inherited from | ||
# the parent, so we give the child complete control over permissions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
# POSIX.1 requires that every STOPPED process in an orphaned process | ||
# group be sent a SIGHUP signal followed by a SIGCONT signal. Since the | ||
# second child is not STOPPED though, we can safely forego ignoring the | ||
# SIGHUP signal. In any case, there are no ill-effects if it is ignored. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
# a controlling terminal. The second case isn't so easy to dismiss. | ||
# The process group is orphaned when the first child terminates and | ||
# POSIX.1 requires that every STOPPED process in an orphaned process | ||
# group be sent a SIGHUP signal followed by a SIGCONT signal. Since the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (80 > 79 characters)
# stopped, then SIGHUP and SIGCONT are sent to all members of the | ||
# orphaned group." [2] | ||
# | ||
# The first case can be ignored since the child is guaranteed not to have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
# two cases where SIGHUP is sent on the death of a process: | ||
# | ||
# 1) When the process that dies is the session leader of a session that | ||
# is attached to a terminal device, SIGHUP is sent to all processes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (80 > 79 characters)
# "However, as part of the session management system, there are exactly | ||
# two cases where SIGHUP is sent on the death of a process: | ||
# | ||
# 1) When the process that dies is the session leader of a session that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (81 > 79 characters)
raise Exception("%s [%d]" % (e.strerror, e.errno)) | ||
|
||
if (pid == 0): # The first child. | ||
# To become the session leader of this new session and the process group |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (80 > 79 characters)
return(0) | ||
try: | ||
# Fork a child process so the parent can exit. This returns control to | ||
# the command-line or shell. It also guarantees that the child will not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (80 > 79 characters)
os.dup2(0, 2) # standard error (2) | ||
|
||
return(0) | ||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IndentationError: unexpected indent
unexpected indentation
Miscellaneous style fixes.