~cr3/ubuntu/quantal/unattended-upgrades/1046438

« back to all changes in this revision

Viewing changes to unattended-upgrade

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt, Michael Vogt, Alex Owen
  • Date: 2010-08-26 18:41:06 UTC
  • mfrom: (4.1.27 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100826184106-lnq2m6kp3g42iqdx
Tags: 0.62
[ Michael Vogt ]
* updated Russian program translation, thanks to
  Yuri Kozlov, closes: #592646
* updated pt_BR translations, thanks to Sergio Cipolla,
  closes: #593755

[ Alex Owen ]
* allow ":" as seperator in Unattended-Upgrade::Allowed-Origins
  (closes: #536754) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/python
2
 
# Copyright (c) 2005-2009 Canonical Ltd
 
2
# Copyright (c) 2005-2010 Canonical Ltd
3
3
#
4
4
# AUTHOR:
5
5
# Michael Vogt <mvo@ubuntu.com>
82
82
    """
83
83
    allowed_origins = []
84
84
    for s in apt_pkg.config.value_list("Unattended-Upgrade::Allowed-Origins"):
85
 
        (distro_id, distro_codename) = s.split()
 
85
        # if there is a ":" use that as seperator, else use spaces
 
86
        if ":" in s:
 
87
            (distro_id, distro_codename) = s.split(':')
 
88
        else:
 
89
            (distro_id, distro_codename) = s.split()
86
90
        allowed_origins.append((substitute(distro_id), 
87
91
                                substitute(distro_codename)))
88
92
    return allowed_origins