-
-
Notifications
You must be signed in to change notification settings - Fork 111
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 free-form text to qube for notes, comments, ... #656
base: main
Are you sure you want to change the base?
Conversation
0940271
to
72c5176
Compare
Black complains |
72c5176
to
2278095
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #656 +/- ##
==========================================
- Coverage 69.81% 69.80% -0.01%
==========================================
Files 58 58
Lines 12542 12593 +51
==========================================
+ Hits 8756 8791 +35
- Misses 3786 3802 +16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Black complains are resolved. And the Codecov is advising on the required unittests. I guess I can proceed with the unittests? And I should assure that proper errors are raised if necessary. |
d9b77a8
to
2fdb146
Compare
Core and API part of adding free-form text to each qube for comments, notes, descriptions, remarks, reminders, etc. fixes: QubesOS/qubes-issues#899
2fdb146
to
884cd29
Compare
self.fire_event_for_permission() | ||
try: | ||
notes = self.dest.get_notes() | ||
except Exception as e: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this broad except is a good idea, it may make bug reports (if any) hard to follow, as it will hide the backtrace, and for many built-in exception message is quite enigmatic (for example KeyError without context is hard to find).
get_notes() already has handing for expected errors (if some are missing, should be added there)
) | ||
try: | ||
self.dest.set_notes(notes) | ||
except Exception as e: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment here
b"test-vm1", | ||
payload=payload, | ||
) | ||
with self.assertRaises(qubes.exc.QubesException): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should wrap only the last call_mgmt_func call, no?
Core and API part of adding free-form text to each qube for comments, notes, descriptions, remarks, reminders, etc.
fixes: QubesOS/qubes-issues#899