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

Error when trying to profile_list #1

Open
enewe101 opened this issue Feb 17, 2016 · 1 comment
Open

Error when trying to profile_list #1

enewe101 opened this issue Feb 17, 2016 · 1 comment

Comments

@enewe101
Copy link

Running chirpy profile_list gave the following error:

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/ndg/enewel3/.local/lib/python2.7/site-packages/chirpy/command_line.py", line 200, in <module>
    profileModule.plist(configs['lpath'], configs['ppath'])
  File "/home/ndg/enewel3/.local/lib/python2.7/site-packages/chirpy/profileModule.py", line 81, in plist
    p = a[0].rstrip()
IndexError: list index out of range

This is most likely because of running chirpy profile_list soon after initiating a chirpy user command: the chirpy user command had created a new log, but had not yet written anything to file.

Probable fix is to have the profileModule.plist() tolerate empty log files, or avoid letting log files be empty for any amount of time.

Calling chirpy profile_list a few minutes later worked (probably because the log file had content at that point).

@hmsaleem
Copy link
Owner

Thanks, will fix it in the next push along with unittests and any other bugs.

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

No branches or pull requests

2 participants