mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-20 01:19:26 +01:00
resolve warnings about 'is not' and integer comparisons (#1435)
running supybot-adduser (or supybot-reset-password) with a recent python would result in the warning: > ``` > /usr/local/bin/supybot-adduser:59: SyntaxWarning: "is not" with a literal. Did you mean "!="? > if len(args) is not 1: > ``` This commits corrects the syntax. `
This commit is contained in:
parent
76b5a42428
commit
d24130f46d
@ -56,7 +56,7 @@ def main():
|
||||
help='capability the user should have; '
|
||||
'this option may be given multiple times.')
|
||||
(options, args) = parser.parse_args()
|
||||
if len(args) is not 1:
|
||||
if len(args) != 1:
|
||||
parser.error('Specify the users.conf file you\'d like to use. '
|
||||
'Be sure *not* to specify your registry file, generated '
|
||||
'by supybot-wizard. This is not the file you want. '
|
||||
|
@ -52,7 +52,7 @@ def main():
|
||||
dest='password',
|
||||
help='password for the user.')
|
||||
(options, args) = parser.parse_args()
|
||||
if len(args) is not 1:
|
||||
if len(args) != 1:
|
||||
parser.error('Specify the users.conf file you\'d like to use. '
|
||||
'Be sure *not* to specify your registry file, generated '
|
||||
'by supybot-wizard. This is not the file you want. '
|
||||
|
Loading…
Reference in New Issue
Block a user