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

Adding -G flag under demo resulted in a crash, when getent is missing (fi. on a macbook) #262

Closed
fgeorgatos opened this issue Dec 8, 2016 · 3 comments
Assignees
Labels
Milestone

Comments

@fgeorgatos
Copy link
Collaborator

was running fine without -G, but adding that makes hell break lose:

[...]
dn78foo|1_530_305040451553513113########|b|tbu|
 pc1bar|________________################|d|   |

Exiting. Thank you for ..watching ;)
[535][fotis.CTFwork-7: /Users/fotis/qtop]$ ./qtop -FG -b demo -w
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/runpy.py", line 122, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/runpy.py", line 34, in _run_code
    exec code in run_globals
  File "/Users/fotis/qtop/qtop.py", line 2193, in <module>
    display.display_selected_sections(savepath, SAMPLE_FILENAME, QTOP_LOGFILE)
  File "/Users/fotis/qtop/qtop.py", line 1257, in display_selected_sections
    display_func(*args) if not sections_off[idx] else None
  File "/Users/fotis/qtop/qtop.py", line 1359, in display_user_accounts_pool_mappings
    detail_of_name = get_detail_of_name(account_jobs_table)
  File "/Users/fotis/qtop/qtop.py", line 324, in get_detail_of_name
    p = subprocess.Popen(passwd_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 623, in __init__
    errread, errwrite)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1141, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
@fgeorgatos fgeorgatos added the bug label Dec 8, 2016
@fgeorgatos fgeorgatos added this to the 0.9.20161214 milestone Dec 8, 2016
@sfranky
Copy link
Collaborator

sfranky commented Dec 8, 2016

@fgeorgatos
can't reproduce... works fine here. Did you try it on any other machines?

@fgeorgatos fgeorgatos changed the title Adding -G flag under demo resulted in a crach Adding -G flag under demo resulted in a crash, when getent is missing (fi. on a macbook) Dec 8, 2016
@sfranky
Copy link
Collaborator

sfranky commented Dec 8, 2016

fix in #263

@sfranky sfranky closed this as completed Dec 8, 2016
@fgeorgatos
Copy link
Collaborator Author

OK, this was caused because of a) missing getent b) no need to seek getent when under demo

Case (a) is now handled gracefully via PR #263, meanwhile on a macbook getent may be simulated via: http://zzamboni.org/new/brt/2008/01/21/how-to-emulate-unix-getent-with-macosxs-dscl/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

No branches or pull requests

2 participants