dgetlp: Require a UTF-8 locale, or it'll crash when displaying errors

(LP: #979117)
This commit is contained in:
Stefano Rivera 2012-05-06 06:27:32 +02:00
parent e47a99c42a
commit 165bb84bf5
2 changed files with 5 additions and 0 deletions

2
debian/changelog vendored
View File

@ -6,6 +6,8 @@ ubuntu-dev-tools (0.142) UNRELEASED; urgency=low
* check-mir, check-symbols, grep-merges, pbuilder-dist-simple,
setup-packaging-environment, submittodebian, ubuntu-iso:
Do enough argument parsing to handle --help (LP: #988009)
* dgetlp: Require a UTF-8 locale, or it'll crash when displaying errors
(LP: #979117)
-- Stefano Rivera <stefanor@debian.org> Wed, 25 Apr 2012 17:38:58 +0200

3
dgetlp
View File

@ -43,6 +43,7 @@ except ImportError:
sys.exit(1)
from ubuntutools import subprocess
import ubuntutools.misc
USAGE = u"""Usage: %prog [-d|(-v|-q)] <Launchpad URL>
@ -253,6 +254,8 @@ def main():
default=False, help="Never print any output")
(options, args) = parser.parse_args()
ubuntutools.misc.require_utf8()
if len(args) != 1:
parser.error("Missing URL")
Debug = options.debug