Remove superfluous semicolons
This commit is contained in:
parent
f07aad171a
commit
49d27c82e6
@ -86,7 +86,7 @@ class MultiFile:
|
|||||||
return line
|
return line
|
||||||
else:
|
else:
|
||||||
# Ignore trailing whitespace on marker lines
|
# Ignore trailing whitespace on marker lines
|
||||||
k = len(line) - 1;
|
k = len(line) - 1
|
||||||
while line[k] in string.whitespace:
|
while line[k] in string.whitespace:
|
||||||
k = k - 1
|
k = k - 1
|
||||||
marker = line[:k+1]
|
marker = line[:k+1]
|
||||||
|
@ -46,7 +46,7 @@ class netrc:
|
|||||||
tt = lexer.get_token()
|
tt = lexer.get_token()
|
||||||
if tt=='' or tt == 'machine' or tt == 'default' or tt == 'macdef':
|
if tt=='' or tt == 'machine' or tt == 'default' or tt == 'macdef':
|
||||||
if toplevel == 'macdef':
|
if toplevel == 'macdef':
|
||||||
break;
|
break
|
||||||
elif login and password:
|
elif login and password:
|
||||||
self.hosts[entryname] = (login, account, password)
|
self.hosts[entryname] = (login, account, password)
|
||||||
lexer.push_token(tt)
|
lexer.push_token(tt)
|
||||||
|
12
Lib/shlex.py
12
Lib/shlex.py
@ -22,7 +22,7 @@ class shlex:
|
|||||||
self.whitespace = ' \t\r\n'
|
self.whitespace = ' \t\r\n'
|
||||||
self.quotes = '\'"'
|
self.quotes = '\'"'
|
||||||
self.state = ' '
|
self.state = ' '
|
||||||
self.pushback = [];
|
self.pushback = []
|
||||||
self.lineno = 1
|
self.lineno = 1
|
||||||
self.debug = 0
|
self.debug = 0
|
||||||
self.token = ''
|
self.token = ''
|
||||||
@ -36,7 +36,7 @@ class shlex:
|
|||||||
"Push a token onto the stack popped by the get_token method"
|
"Push a token onto the stack popped by the get_token method"
|
||||||
if self.debug >= 1:
|
if self.debug >= 1:
|
||||||
print "shlex: pushing token " + `tok`
|
print "shlex: pushing token " + `tok`
|
||||||
self.pushback = [tok] + self.pushback;
|
self.pushback = [tok] + self.pushback
|
||||||
|
|
||||||
def get_token(self):
|
def get_token(self):
|
||||||
"Get a token from the input stream (or from stack if it's nonempty)"
|
"Get a token from the input stream (or from stack if it's nonempty)"
|
||||||
@ -83,18 +83,18 @@ class shlex:
|
|||||||
"Read a token from the input stream (no pushback or inclusions)"
|
"Read a token from the input stream (no pushback or inclusions)"
|
||||||
tok = ''
|
tok = ''
|
||||||
while 1:
|
while 1:
|
||||||
nextchar = self.instream.read(1);
|
nextchar = self.instream.read(1)
|
||||||
if nextchar == '\n':
|
if nextchar == '\n':
|
||||||
self.lineno = self.lineno + 1
|
self.lineno = self.lineno + 1
|
||||||
if self.debug >= 3:
|
if self.debug >= 3:
|
||||||
print "shlex: in state", repr(self.state), \
|
print "shlex: in state", repr(self.state), \
|
||||||
"I see character:", repr(nextchar)
|
"I see character:", repr(nextchar)
|
||||||
if self.state is None:
|
if self.state is None:
|
||||||
self.token = ''; # past end of file
|
self.token = '' # past end of file
|
||||||
break
|
break
|
||||||
elif self.state == ' ':
|
elif self.state == ' ':
|
||||||
if not nextchar:
|
if not nextchar:
|
||||||
self.state = None; # end of file
|
self.state = None # end of file
|
||||||
break
|
break
|
||||||
elif nextchar in self.whitespace:
|
elif nextchar in self.whitespace:
|
||||||
if self.debug >= 2:
|
if self.debug >= 2:
|
||||||
@ -125,7 +125,7 @@ class shlex:
|
|||||||
break
|
break
|
||||||
elif self.state == 'a':
|
elif self.state == 'a':
|
||||||
if not nextchar:
|
if not nextchar:
|
||||||
self.state = None; # end of file
|
self.state = None # end of file
|
||||||
break
|
break
|
||||||
elif nextchar in self.whitespace:
|
elif nextchar in self.whitespace:
|
||||||
if self.debug >= 2:
|
if self.debug >= 2:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user