Package: python2.5
Version: 2.5.4
Severity: important
Tags: patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
A file with bad permissions opened in pyversions.py leads to an
unexpected termination for pyversions ("control" file or/and
/usr/share/python/debian_defaults).
Here is a really simple patch to catch the exceptions and to exit
pyversions properly while warning the user.
Regards,
Carl Chenet
- -- System Information:
Debian Release: lenny/sid
APT prefers hardy-updates
APT policy: (500, 'hardy-updates'), (500, 'hardy-security'), (500, 'hardy')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.24-23-generic (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages python2.5 depends on:
ii libbz2-1.0 1.0.4-2ubuntu4 high-quality block-sorting file co
ii libc6 2.7-10ubuntu4 GNU C Library: Shared libraries
ii libdb4.6 4.6.21-6ubuntu1 Berkeley v4.6 Database Libraries [
ii libncursesw5 5.6+20071124-1ubuntu2 Shared libraries for terminal hand
ii libreadline5 5.2-3build1 GNU readline and history libraries
ii libsqlite3-0 3.4.2-2 SQLite 3 shared library
ii libssl0.9.8 0.9.8g-4ubuntu3.4 SSL shared libraries
ii mime-support 3.39-1ubuntu1 MIME files 'mime.types' & 'mailcap
ii python2.5-minimal 2.5.2-2ubuntu4.1 A minimal subset of the Python lan
python2.5 recommends no packages.
- -- no debconf information
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFJzVmC8lge+lYYJUgRAvJKAJ9dLuSntVTFtsgwUO2MTVnRtGHs5QCfd10K
0LPrJLT0SbU+6wy6s2edNOg=
=c5IQ
-----END PGP SIGNATURE-----
18c18,22
< config.readfp(file('/usr/share/python/debian_defaults'))
---
> try:
> config.readfp(file('/usr/share/python/debian_defaults'))
> except IOError, msg:
> print msg
> sys.exit(1)
236,255c240,263
< for line in file(fn):
< line = line.strip()
< if line == '':
< if section == None:
< continue
< if pkg == 'Source':
< break
< section = None
< elif line.startswith('Source:'):
< section = 'Source'
< elif line.startswith('Package: ' + pkg):
< section = pkg
< elif line.startswith('XS-Python-Version:'):
< if section != 'Source':
< raise ValueError, \
< 'attribute XS-Python-Version not in Source section'
< sversion = line.split(':', 1)[1].strip()
< elif line.startswith('XB-Python-Version:'):
< if section == pkg:
< version = line.split(':', 1)[1].strip()
---
> try:
> for line in file(fn):
> line = line.strip()
> if line == '':
> if section == None:
> continue
> if pkg == 'Source':
> break
> section = None
> elif line.startswith('Source:'):
> section = 'Source'
> elif line.startswith('Package: ' + pkg):
> section = pkg
> elif line.startswith('XS-Python-Version:'):
> if section != 'Source':
> raise ValueError, \
> 'attribute XS-Python-Version not in Source section'
> sversion = line.split(':', 1)[1].strip()
> elif line.startswith('XB-Python-Version:'):
> if section == pkg:
> version = line.split(':', 1)[1].strip()
> except IOError, msg:
> print msg
> sys.exit(1)
303c311,315
< vstring = file(fn).readline().rstrip('\n')
---
> try:
> vstring = file(fn).readline().rstrip('\n')
> except IOError, msg:
> print msg
> sys.exit(1)