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

Add CLI option to list available modules in mod_dir #15

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

Add CLI option to list available modules in mod_dir #15

wants to merge 7 commits into from

Conversation

imjonsnooow
Copy link
Contributor

Attempt to resolve #11 by adding a new option flag.

@@ -28,6 +28,8 @@ options:
-i INTERFACE, --interface=INTERFACE
interface to listen on
-m, --module_info print information about module(s) and exit
-m, --all_module_list
print list of modules available and exit. Works with -M option.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to mention -M here.

This doesn't work when using -B though, and it should.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If -B is specified, wouldn't mod_dir incorporate that on line 507 of ChopLib.py? Since the added code walks mod_dir, I thought this solution would handle -B. (Definitely correct me if I'm wrong - today is my first time looking at this code.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have thought it would have worked too but it doesn't.

wxs@psh chopshop % ./chopshop -B ~/chopshop_modules -a

It just hangs. I can provide more input if you can not reproduce this. You can probably get away with making a dummy chopshop module and putting it in ~/chopshop_modules/modules to test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I attempt the same line (after making that directory), I get "No modules found in directory" as a result, as expected. Could it be an environment issue? I'm testing on OS X 10.8.4.

@wxsBSD
Copy link
Contributor

wxsBSD commented Aug 1, 2013

This is still not working when using -B. I'm not able to debug it right now either. I'll be in touch with you to help figure this out.

@imjonsnooow
Copy link
Contributor Author

Absolutely - give me a shout when you have time. I've tested it on my machine and it works fine for me with the -B option, so I'd like to work with you to figure it out!

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.

List all modules
2 participants