SyntaxWarning: "is" with a literal

Bug #1874621 reported by Aiko Barz
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
khal (Debian)
Fix Released
Unknown
khal (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Starting khal (Ubuntu 20.04) gives me an error:

$ khal
/usr/lib/python3/dist-packages/khal/settings/utils.py:136: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if color is None or color is '':

Line 136 looks like this:
  if color is None or color is '':

In upstream¹ this line looks like that:
  if color is None or color == '':

I patched my utils.py manually, now the error is gone.

Kind regards
Aiko

¹: https://github.com/pimutils/khal/blob/master/khal/settings/utils.py#L156

Tags: focal groovy
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Thanks for taking your time to report this issue and help making Ubuntu better. Marking this confirmed based on the corresponding Debian bug report.

Changed in khal (Ubuntu):
status: New → Confirmed
tags: added: focal groovy
Changed in khal (Debian):
status: Unknown → New
Changed in khal (Debian):
status: New → Confirmed
Changed in khal (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.