diff options
author | Alexandre Detiste <alexandre.detiste@gmail.com> | 2015-05-28 21:32:51 +0200 |
---|---|---|
committer | Didier Raboud <odyx@debian.org> | 2015-07-14 11:47:47 +0200 |
commit | e39c7a187c04ac4d2e3837d3845f547231354457 (patch) | |
tree | 1e6f164dffd7b14124cd6bc906ee38f6aef2bb94 /remove_initd | |
parent | 247adfbd93391ebf663b3245a6542d69674e4d7b (diff) |
Port to python3, keep compatibility symlink for lsb_release.py
Closes: #719063
Diffstat (limited to 'remove_initd')
-rwxr-xr-x | remove_initd | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/remove_initd b/remove_initd index 0322c7f..2eaa440 100755 --- a/remove_initd +++ b/remove_initd @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 import sys, re, os, initdutils @@ -12,7 +12,7 @@ if len(sys.argv) > 1: else: initfile = os.path.join('/etc/init.d', initfile) else: - print >> sys.stderr, 'Usage: %s /etc/init.d/<init-script>' % sys.argv[0] + print('Usage: %s /etc/init.d/<init-script>' % sys.argv[0], file=sys.stderr) sys.exit(1) headers = initdutils.scan_initfile(initfile) @@ -30,13 +30,13 @@ if provides: entries[entry[0]] = entry[1] facilities[facility] = entries - for (initscript, needed) in depends.iteritems(): + for (initscript, needed) in depends.items(): for facility in needed: if facility[0] == "$": continue if not facilities.get(facility) and facility in provides: - print >> sys.stderr, 'Unable to remove %s: %s needs %s\n' % ( - initfile, initscript, facility) + print('Unable to remove %s: %s needs %s\n' % ( + initfile, initscript, facility), file=sys.stderr) sys.exit(1) if initfile in depends: |