Merge lp:~mpontillo/maas/fix-1553605 into lp:~maas-maintainers/maas/packaging

Proposed by Mike Pontillo
Status: Merged
Approved by: Andres Rodriguez
Approved revision: no longer in the source branch.
Merged at revision: 449
Proposed branch: lp:~mpontillo/maas/fix-1553605
Merge into: lp:~maas-maintainers/maas/packaging
Diff against target: 23 lines (+13/-6)
1 file modified
debian/extras/maas (+13/-6)
To merge this branch: bzr merge lp:~mpontillo/maas/fix-1553605
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Review via email: mp+288210@code.launchpad.net

Commit message

Replace shell script wrapper with Python wrapper to fix bug #1553605.

To post a comment you must log in.
Revision history for this message
Andres Rodriguez (andreserl) wrote :

lgtm!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/extras/maas'
2--- debian/extras/maas 2015-12-09 02:18:13 +0000
3+++ debian/extras/maas 2016-03-06 01:12:55 +0000
4@@ -1,6 +1,13 @@
5-#!/bin/sh
6-if [ "`expr \"$0\" : \".*maas-cli*\"`" != "0" ];then
7- echo " WARNING: The maas-cli command is deprecated and will be removed" \
8- "in a future\n version. From now on please use 'maas' instead." >&2
9-fi
10-exec python3 -m maascli "$@"
11+#!/usr/bin/env python3
12+
13+import sys
14+import maascli
15+
16+if sys.argv[0].split('/')[-1:] == "maas-cli":
17+ sys.stderr.write("""
18+ WARNING: The maas-cli command is deprecated and will be removed in a future
19+ version. From now on please use 'maas' instead.
20+""")
21+
22+sys.exit(maascli.main())
23+

Subscribers

People subscribed via source and target branches