Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

oscapd-cli traceback without any arguments #79

Closed
jan-cerny opened this issue Apr 6, 2016 · 7 comments
Closed

oscapd-cli traceback without any arguments #79

jan-cerny opened this issue Apr 6, 2016 · 7 comments
Assignees
Labels
Milestone

Comments

@jan-cerny
Copy link
Member

Hello, I use openscap-daemon-0.1.4-1.fc23.noarch from Fedora 23 updates testing repository.
and I have seen a traceback when I omitted -i option:

[root@thinkpad jcerny]# oscapd-cli task-create
Traceback (most recent call last):
  File "/usr/bin/oscapd-cli", line 787, in <module>
    main()
  File "/usr/bin/oscapd-cli", line 775, in main
    cli_task_create(dbus_iface, args)
  File "/usr/bin/oscapd-cli", line 386, in cli_task_create
    raise NotImplementedError("Not yet!")
NotImplementedError: Not yet!
@jan-cerny jan-cerny added the bug label Apr 6, 2016
@jan-cerny jan-cerny added this to the 0.1.5 milestone Apr 6, 2016
@ybznek
Copy link
Contributor

ybznek commented Apr 6, 2016

I suggest to close this issue.
#3

Now it really says what is wrong "NotImplementedError: Not yet!" and traceback is bonus. 👍

@jan-cerny
Copy link
Member Author

I see, but I am not much happy when I get such a "bonus" :-)

@mpreisler mpreisler modified the milestones: 0.1.5, 0.1.6 Apr 22, 2016
@mpreisler
Copy link
Member

It is not implemented so this is really a feature request, not a bug...

@jan-cerny
Copy link
Member Author

Ok, I only thought that it is not nice to show tracebacks to users. In my opinion it would be better to catch this exception and show an error message.

@mpreisler
Copy link
Member

I am a fan of tracebacks, they are very useful. I don't find them offensive or embarrassing. Perhaps that's just me though.

@jan-cerny
Copy link
Member Author

@mpreisler I also like when an bug report contains a traceback, it is definitely helpful for me.

But in my opinion tracebacks that have already been reported should be handled or fixed. It is quite easy to do it in Python. I think that a traceback should appear only when something went wrong that we don't know about yet.

In this particular case, the expected behavior is to tell the user that he must specify more options to do some action, give him an advice which options are possible and terminate. The fact that some RFE is not implemented now doesn't necessarily conflict with this expectation.

I would like to point out that the goal of oscapd-cli is easy and simple user interaction.
I don't know whether a traceback is a recommended way of communication with users.

There exist users who don't understand details of our implementation so when they will see this particular traceback they will think that something horrible happened or they are missing some package etc. We will have to spend time explaining that.

jan-cerny added a commit to jan-cerny/openscap-daemon that referenced this issue Jul 18, 2016
In "oscapd-cli task-create", only interactive mode is possible now.
When run without "-i" user will be informed about a missing option
instead of seeing a traceback.
mpreisler added a commit that referenced this issue Jul 18, 2016
Issue #79: Fix oscapd-cli traceback
@jan-cerny jan-cerny self-assigned this Jul 19, 2016
@jan-cerny
Copy link
Member Author

Fixed in #87

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants