mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-29 01:31:29 +00:00
requestsync, grep-merges: Require a UTF-8 locale. (Closes: #613114,
LP: #553795)
This commit is contained in:
parent
ddf4bac12e
commit
d054dcf796
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -15,6 +15,8 @@ ubuntu-dev-tools (0.117) UNRELEASED; urgency=low
|
|||||||
* grab-merge: Show help when no arguments are provided.
|
* grab-merge: Show help when no arguments are provided.
|
||||||
* pull-revu-source: Check for the availability of libwww-perl, and print a
|
* pull-revu-source: Check for the availability of libwww-perl, and print a
|
||||||
more helpful error.
|
more helpful error.
|
||||||
|
* requestsync, grep-merges: Require a UTF-8 locale. (Closes: #613114,
|
||||||
|
LP: #553795)
|
||||||
|
|
||||||
-- Stefano Rivera <stefanor@ubuntu.com> Sun, 13 Feb 2011 15:28:18 +0200
|
-- Stefano Rivera <stefanor@ubuntu.com> Sun, 13 Feb 2011 15:28:18 +0200
|
||||||
|
|
||||||
|
@ -23,7 +23,10 @@ import sys
|
|||||||
import urllib2
|
import urllib2
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
import ubuntutools.misc
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
ubuntutools.misc.require_utf8()
|
||||||
if len(sys.argv) > 1:
|
if len(sys.argv) > 1:
|
||||||
match = sys.argv[1]
|
match = sys.argv[1]
|
||||||
else:
|
else:
|
||||||
|
@ -35,6 +35,7 @@ from debian.changelog import Version
|
|||||||
from ubuntutools.config import UDTConfig, ubu_email
|
from ubuntutools.config import UDTConfig, ubu_email
|
||||||
from ubuntutools.distro_info import UbuntuDistroInfo
|
from ubuntutools.distro_info import UbuntuDistroInfo
|
||||||
from ubuntutools.lp import udtexceptions
|
from ubuntutools.lp import udtexceptions
|
||||||
|
import ubuntutools.misc
|
||||||
from ubuntutools.requestsync.common import (edit_report, getDebianChangelog,
|
from ubuntutools.requestsync.common import (edit_report, getDebianChangelog,
|
||||||
raw_input_exit_on_ctrlc)
|
raw_input_exit_on_ctrlc)
|
||||||
|
|
||||||
@ -89,6 +90,8 @@ def main():
|
|||||||
parser.print_help()
|
parser.print_help()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
ubuntutools.misc.require_utf8()
|
||||||
|
|
||||||
config = UDTConfig(options.no_conf)
|
config = UDTConfig(options.no_conf)
|
||||||
if not options.lpapi:
|
if not options.lpapi:
|
||||||
options.lpapi = config.get_value('USE_LPAPI', default=False,
|
options.lpapi = config.get_value('USE_LPAPI', default=False,
|
||||||
|
@ -22,9 +22,11 @@
|
|||||||
# ##################################################################
|
# ##################################################################
|
||||||
|
|
||||||
# Modules.
|
# Modules.
|
||||||
|
import locale
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
|
import sys
|
||||||
|
|
||||||
from ubuntutools.lp.udtexceptions import PocketDoesNotExistError
|
from ubuntutools.lp.udtexceptions import PocketDoesNotExistError
|
||||||
|
|
||||||
@ -119,3 +121,10 @@ def split_release_pocket(release):
|
|||||||
pocket)
|
pocket)
|
||||||
|
|
||||||
return (release, pocket)
|
return (release, pocket)
|
||||||
|
|
||||||
|
def require_utf8():
|
||||||
|
'''Can be called by programs that only function in UTF-8 locales'''
|
||||||
|
if locale.getpreferredencoding() != 'UTF-8':
|
||||||
|
print >> sys.stderr, ("This program only functions in a UTF-8 locale. "
|
||||||
|
"Aborting.")
|
||||||
|
sys.exit(1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user