django-admin prints spurious messages to stdout, breaking scripts

Bug #1365130 reported by Gavin Panella
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Raphaël Badin
python-django (Ubuntu)
Fix Committed
Undecided
Raphaël Badin

Bug Description

Scripts in MAAS's packaging rely on shell code like the following:

  APIKEY=$(maas-region-admin apikey --username admin)

maas-region-admin is a shell script that execs django-admin.

However, the new django-admin in Utopic prints lines like:

  Using: Python 2.7

to _stdout_ as part of its normal operation. This breaks programs that rely on capturing stdout.

I would expect that a message of this nature should go to stderr at least. Better for us would be if it were omitted altogether, but there may be good reasons for it to stay.

We can work around this in MAAS, by bypassing django-admin.

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: python-django-common 1.6.5-3
ProcVersionSignature: Ubuntu 3.13.0-35.62-generic 3.13.11.6
Uname: Linux 3.13.0-35-generic x86_64
NonfreeKernelModules: veth xt_CHECKSUM iptable_mangle ipt_MASQUERADE iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack xt_tcpudp bridge stp llc iptable_filter ip_tables x_tables snd_ens1371 snd_ac97_codec ac97_bus gameport snd_pcm snd_page_alloc snd_seq_midi coretemp snd_seq_midi_event kvm_intel kvm snd_rawmidi crct10dif_pclmul crc32_pclmul ghash_clmulni_intel vmw_balloon aesni_intel aes_x86_64 snd_seq lrw gf128mul glue_helper ablk_helper cryptd snd_seq_device serio_raw snd_timer snd bnep rfcomm bluetooth soundcore vmwgfx ttm drm vmxnet3 vmw_vmci i2c_piix4 parport_pc shpchp ppdev lp parport mac_hid hid_generic usbhid hid mptspi psmouse ahci libahci e1000 floppy mptscsih mptbase
ApportVersion: 2.14.7-0ubuntu1
Architecture: amd64
Date: Wed Sep 3 20:41:20 2014
Dependencies: libjs-jquery 1.7.2+dfsg-3ubuntu2
PackageArchitecture: all
ProcEnviron:
 TERM=vt102
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: python-django
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Gavin Panella (allenap)
Changed in maas:
status: New → Triaged
importance: Undecided → Critical
Changed in maas:
milestone: none → 1.7.0
Raphaël Badin (rvb)
Changed in python-django (Ubuntu):
status: New → In Progress
assignee: nobody → Raphaël Badin (rvb)
Raphaël Badin (rvb)
Changed in python-django (Ubuntu):
status: In Progress → Fix Committed
Changed in maas:
assignee: nobody → Raphaël Badin (rvb)
status: Triaged → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
Revision history for this message
Andres Rodriguez (andreserl) wrote :

This bug was filed in upstream MAAS and not in Ubuntu. It was fixed as part of 1.7. This was fixed and verified to be working in all Ubuntu releases. Ubuntu 1.7 is being SRU'd. Marking this as verification-done, as it seems to be blocking SRU.

tags: added: verification-done
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.