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:
Lars Kellogg-Stedman 2020-10-29 15:22:34 -04:00 committed by GitHub
parent 76b5a42428
commit d24130f46d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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. '

View File

@ -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. '