mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-07 15:01:34 +00:00
dgetlp, submittodebian, 404main: Use unicode strings for literal strings
containing non-ASCII characters (LP: #836661)
This commit is contained in:
parent
54cb83cd4d
commit
0d4c692262
14
404main
14
404main
@ -128,7 +128,7 @@ def main():
|
||||
if len(sys.argv) == 3 and sys.argv[2]:
|
||||
distro = sys.argv[2]
|
||||
if not get_package_version(cache, distro, 'bash'):
|
||||
print '«%s» is not a valid distribution.' % distro
|
||||
print u'«%s» is not a valid distribution.' % distro
|
||||
print ('Remember that for 404main to work with a certain '
|
||||
'distribution it must be in your /etc/apt/sources.list '
|
||||
'file.')
|
||||
@ -139,12 +139,12 @@ def main():
|
||||
distro = process.stdout.read().strip('\n')
|
||||
|
||||
if not get_package_version(cache, distro, sys.argv[1]):
|
||||
print 'Can\'t find package «%s» in distribution «%s».' % \
|
||||
(sys.argv[1], distro)
|
||||
print (u"Can't find package «%s» in distribution «%s»."
|
||||
% (sys.argv[1], distro))
|
||||
sys.exit(1)
|
||||
|
||||
print 'Checking package «%s» in distribution «%s»...' % \
|
||||
(sys.argv[1], distro)
|
||||
print (u'Checking package «%s» in distribution «%s»...'
|
||||
% (sys.argv[1], distro))
|
||||
|
||||
find_main(cache, sys.argv[1])
|
||||
|
||||
@ -159,8 +159,8 @@ def main():
|
||||
print ' ', package
|
||||
|
||||
if all_in_main:
|
||||
print ('Package «%s» and all its dependencies and build dependencies '
|
||||
'are in main.') % sys.argv[1]
|
||||
print (u'Package «%s» and all its dependencies and build dependencies '
|
||||
u'are in main.') % sys.argv[1]
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
|
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -19,6 +19,8 @@ ubuntu-dev-tools (0.129) UNRELEASED; urgency=low
|
||||
* syncpackage: Show changes to be synced when performing native syncs.
|
||||
* syncpackage: Support --bug (extra bugs to be closed by the sync) with
|
||||
native syncs. (Bugs are closed one individually, via the API, post-sync)
|
||||
* dgetlp, submittodebian, 404main: Use unicode strings for literal strings
|
||||
containing non-ASCII characters (LP: #836661)
|
||||
|
||||
-- Stefano Rivera <stefanor@debian.org> Sat, 03 Sep 2011 21:04:38 +0200
|
||||
|
||||
|
4
dgetlp
4
dgetlp
@ -219,10 +219,10 @@ def download(dscinfo, number, filename, verify=True):
|
||||
fd.close()
|
||||
outfd.close()
|
||||
except urllib2.HTTPError, err:
|
||||
status("Failed to fetch «%s» file, aborting.", ftype)
|
||||
status(u"Failed to fetch «%s» file, aborting.", ftype)
|
||||
error(106, "Error: (%d %s)", err.code, err.msg)
|
||||
except urllib2.URLError, err:
|
||||
status("Failed to fetch «%s» file, aborting.", ftype)
|
||||
status(u"Failed to fetch «%s» file, aborting.", ftype)
|
||||
error(105, "Error: %s", err)
|
||||
except IOError, err:
|
||||
status('Could not create "%s"', filename)
|
||||
|
@ -35,13 +35,13 @@ from ubuntutools.question import YesNoQuestion
|
||||
try:
|
||||
from debian.changelog import Changelog
|
||||
except ImportError:
|
||||
print ('This utility requires modules from the «python-debian» package, '
|
||||
'which isn\'t currently installed.')
|
||||
print (u"This utility requires modules from the «python-debian» package, "
|
||||
u"which isn't currently installed.")
|
||||
sys.exit(1)
|
||||
|
||||
if not os.path.exists('/usr/bin/reportbug'):
|
||||
print ('This utility requires the «reportbug» package, which isn\'t '
|
||||
'currently installed.')
|
||||
print (u"This utility requires the «reportbug» package, which isn't "
|
||||
u"currently installed.")
|
||||
sys.exit(1)
|
||||
|
||||
def get_most_recent_debian_version(changelog):
|
||||
@ -104,7 +104,7 @@ def check_file(fname, critical = True):
|
||||
else:
|
||||
if not critical:
|
||||
return False
|
||||
print "Couldn't find «%s».\n" % fname
|
||||
print u"Couldn't find «%s».\n" % fname
|
||||
sys.exit(1)
|
||||
|
||||
def edit_debdiff(debdiff):
|
||||
|
Loading…
x
Reference in New Issue
Block a user