cloud-init package: write-mime-multipart with SyntaxWarning

Bug #1967428 reported by Anna Gabriela Teixeira Araujo
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cloud-utils
Fix Released
Undecided
Unassigned
cloud-init (Ubuntu)
Invalid
Undecided
Arthit Kosachunhanun

Bug Description

When typing the command:

$ write-mime-multipart --output=combined-userdata.txt \
   my-boothook.txt:text/cloud-boothook \
   my-include.txt:text/x-include-url \
   my-upstart-job.txt:text/upstart-job \
   my-user-script.txt:text/x-shellscript \
   my-cloudconfig.txt

The file output works correctly, but the message below comes as output too:
"/usr/bin/write-mime-multipart:104: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if options.output is "-":"

On the line 104 of the script located in /usr/bin/write-mime-multipart, I just changed:

104 if options.output is "-":
105 if hasattr(sys.stdout, "buffer"):

To:

104 if options.output == "-":
105 if hasattr(sys.stdout, "buffer"):

So, the message stops to pop up after running the command.

no longer affects: ubuntu-manpage-repository
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cloud-init (Ubuntu):
status: New → Confirmed
Changed in cloud-init (Ubuntu):
status: Confirmed → Incomplete
status: Incomplete → Confirmed
assignee: nobody → Arthit Kosachunhanun (richshops)
James Falcon (falcojr)
Changed in cloud-init (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
James Falcon (falcojr) wrote :

write-mime-multipart hasn't been part of cloud-init since 0.5.15, which is no longer supported anywhere. It was since moved to the cloud-utils package where it has already been fixed upstream but has not been SRUed to supported Ubuntu releases.

James Falcon (falcojr)
Changed in cloud-utils:
status: New → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :

This was fixed in upstream cloud-utils version 0.32. It is available in Ubuntu 21.10 and later.

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.