Skip to content
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

Fix non iterable #834

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix non iterable #834

wants to merge 2 commits into from

Conversation

GustavoSchip
Copy link

Status

READY

Description

Fixes/prevents a 'TypeError: argument of type 'NoneType' is not iterable' error.
I defaulted to returning False when the initial return failed.

Original error

Traceback (most recent call last):
  File "C:\Users\***\source\routersploit\rsf.py", line 29, in <module>
    routersploit(sys.argv)
  File "C:\Users\***\source\routersploit\rsf.py", line 21, in routersploit
    rsf = RoutersploitInterpreter()
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\***\source\routersploit\routersploit\interpreter.py", line 214, in __init__
    super(RoutersploitInterpreter, self).__init__()
  File "C:\Users\***\source\routersploit\routersploit\interpreter.py", line 54, in __init__
    self.setup()
  File "C:\Users\***\source\routersploit\routersploit\interpreter.py", line 78, in setup
    if is_libedit():
       ^^^^^^^^^^^^
  File "C:\Users\***\source\routersploit\routersploit\interpreter.py", line 43, in is_libedit
    return "libedit" in readline.__doc__
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable

Verification

Provide steps to test or reproduce the PR.

  1. Start ./rsf.py (On windows this was enough to trip the bug.)
  2. Continue using the script (If you made it to this point the fix works.)

Checklist

  • Write module/feature

@GustavoSchip GustavoSchip changed the base branch from master to develop September 17, 2024 08:56
@GustavoSchip GustavoSchip changed the base branch from develop to master September 17, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants