~ubuntu-core-dev/unattended-upgrades/ubuntu

« back to all changes in this revision

Viewing changes to test/test_substitute.py

  • Committer: Barry Warsaw
  • Date: 2012-06-19 20:19:36 UTC
  • mfrom: (277.1.5 unattended-upgrades)
  • mto: This revision was merged to the branch mainline in revision 288.
  • Revision ID: barry@python.org-20120619201936-vrpi8yxbbxzdr6qg
Merge Thomas's branch: Port to Python 3
- Additional fixes by Barry

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python
 
1
#!/usr/bin/python3
2
2
 
3
3
import apt
4
4
import apt_pkg
7
7
import unittest
8
8
import sys
9
9
 
10
 
from StringIO import StringIO
 
10
try:
 
11
    from StringIO import StringIO    # Python 2
 
12
except ImportError:
 
13
    from io import StringIO          # Python 3
11
14
 
12
15
import unattended_upgrade
13
16
from unattended_upgrade import substitute, get_allowed_origins