~ubuntu-branches/ubuntu/quantal/lsb/quantal-proposed

« back to all changes in this revision

Viewing changes to initdutils.py

  • Committer: Package Import Robot
  • Author(s): Brian Murray
  • Date: 2013-08-22 15:16:33 UTC
  • Revision ID: package-import@ubuntu.com-20130822151633-ea3g752wob0hky6m
Tags: 4.0-0ubuntu26.4
initdutils.py: Fully fix issues with Python 3. (LP: #1035136)

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
            pass
97
97
        return
98
98
    
99
 
    fh = file(FACILITIES, 'w')
 
99
    fh = open(FACILITIES, 'w')
100
100
    for facility, entries in facilities.items():
101
101
        # Ignore system facilities
102
102
        if facility.startswith('$'): continue
122
122
    depends = {}
123
123
 
124
124
    if os.path.exists(DEPENDS):
125
 
        independs = RFC822Parser(fileob=file(DEPENDS))
 
125
        independs = RFC822Parser(fileob=open(DEPENDS))
126
126
        for initfile, facilities in independs.iteritems():
127
127
            depends[initfile] = facilities.split()
128
128
    return depends
135
135
            pass
136
136
        return
137
137
    
138
 
    fh = file(DEPENDS, 'w')
 
138
    fh = open(DEPENDS, 'w')
139
139
    for initfile, facilities in depends.iteritems():
140
140
        print >> fh, '%s: %s' % (initfile, ' '.join(facilities))
141
141
    fh.close()