~jdstrand/ufw/ufw-xenial

« back to all changes in this revision

Viewing changes to tests/util/addresses/runtest.sh

  • Committer: Jamie Strandboge
  • Date: 2012-07-06 19:29:50 UTC
  • Revision ID: jamie@canonical.com-20120706192950-1whf5yyzv2v2xc6c
Release 0.32-0ubuntu1

* New upstream release featuring Python 3 port (LP: #1001657)
* debian/control:
  - clean up Depends and Build-Depends
  - Build-Depends on python3
  - add python-ufw for installing python2 modules
  - add X-Python3-Version: >= 3.2
  - update Vcs-Bzr
* add debian/python-ufw.install
* debian/rules:
  - use --install-layout=deb
  - adjust PYTHON to use python3
  - adjust PYVERS to use py3versions
  - add PYTHON2
  - run tests for both PYTHON and PYTHON2
  - run setup.py with both PYTHON and PYTHON2
  - use dh_python3 for ufw
  - use dh_python2 for python-ufw
* debian/ufw.lintian-overrides
  - remove old unneeded override
  - add postrm-does-not-call-updaterc.d-for-init.d-script since Ubuntu's
    debhelper adds code to postinst that does nothing on Ubuntu, but doesn't
    add the corresponding code to postrm
* New upstream release (Closes: 663677, Closes: 625681)
* debian/control: update to standards 3.9.3
* convert to source format 3.0 (quilt)
* 0001-optimize-boot.patch: only read in /etc/ufw/ufw.conf when disabled
* debian/rules: adjust to only install the application profiles when not
  Ubuntu
* debian/po/da.po: add Danish translation of debconf templates. Thanks to
  Joe Dalton (Closes: 666557)

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
cat > $script << EOM
51
51
#! /usr/bin/env $interpreter
52
52
 
 
53
from __future__ import print_function
53
54
import sys
54
55
import ufw.util
55
56
 
56
57
if len(sys.argv) != 3:
57
 
    print >> sys.stderr, "Wrong number of args: %d" % (len(sys.argv))
 
58
    print("Wrong number of args: %d" % (len(sys.argv)), file=sys.stderr)
58
59
    sys.exit(1)
59
60
if not ufw.util.valid_address(sys.argv[2], sys.argv[1]):
60
 
    print >> sys.stderr, "Bad address: %s" % (sys.argv[2])
 
61
    print("Bad address: %s" % (sys.argv[2]), file=sys.stderr)
61
62
    sys.exit(1)
62
63
sys.exit(0)
63
64
EOM
128
129
 
129
130
# test_in_network.py VERSION ADDRESS NETWORK
130
131
 
 
132
from __future__ import print_function
131
133
import sys
132
134
import ufw.util
133
135
 
134
136
if len(sys.argv) != 4:
135
 
    print >> sys.stderr, "Wrong number of args: %d" % (len(sys.argv))
136
 
    print >> sys.stderr, sys.argv
 
137
    print("Wrong number of args: %d" % (len(sys.argv)), file=sys.stderr)
 
138
    print(sys.argv, file=sys.stderr)
137
139
    sys.exit(3)
138
140
 
139
141
v6 = False
146
148
        innet = True
147
149
except:
148
150
    if not ufw.util.valid_address(sys.argv[2], sys.argv[1]):
149
 
        print >> sys.stderr, "Bad address: %s" % (sys.argv[2])
 
151
        print("Bad address: %s" % (sys.argv[2]), file=sys.stderr)
150
152
        sys.exit(2)
151
153
    if not ufw.util.valid_address(sys.argv[3], sys.argv[1]):
152
 
        print >> sys.stderr, "Bad address: %s" % (sys.argv[3])
 
154
        print("Bad address: %s" % (sys.argv[3]), file=sys.stderr)
153
155
        sys.exit(2)
154
156
    sys.exit(3)
155
157