Merge ~arighi/qa-regression-testing:test-apparmor-support-python2-and-python3 into qa-regression-testing:master

Proposed by Andrea Righi
Status: Rejected
Rejected by: Steve Beattie
Proposed branch: ~arighi/qa-regression-testing:test-apparmor-support-python2-and-python3
Merge into: qa-regression-testing:master
Diff against target: 13 lines (+4/-1)
1 file modified
scripts/apparmor/test-net.py (+4/-1)
Reviewer Review Type Date Requested Status
Ubuntu Security Team Pending
Review via email: mp+440746@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Francis Ginther (fginther) wrote :

I recommend replacing this MP with https://code.launchpad.net/~fginther/qa-regression-testing/+git/qa-regression-testing/+merge/440800 which applies additional 2to3 updates.

Revision history for this message
Steve Beattie (sbeattie) wrote :

Thanks and my apologies for not getting to this earlier; the conversion of this script to python3 has already landed, so closing this merge request.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/scripts/apparmor/test-net.py b/scripts/apparmor/test-net.py
2index 6c3ae96..eb73d12 100755
3--- a/scripts/apparmor/test-net.py
4+++ b/scripts/apparmor/test-net.py
5@@ -1,4 +1,7 @@
6-#!/usr/bin/python2
7+#!/bin/sh
8+''':'
9+if which python3 > /dev/null 2>&1; then exec python3 "$0" "$@"; else exec python2 "$0" "$@"; fi
10+'''
11 #
12 # test-net.py quality assurance test script for apparmor
13 # Copyright (C) 2011 Canonical Ltd.

Subscribers

People subscribed via source and target branches