use file instead of open

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1226 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2004-01-29 19:04:49 +00:00
parent 0176b5b99f
commit 76452953f8
3 changed files with 3 additions and 3 deletions

View file

@ -60,7 +60,7 @@ __init__(self, **args)
self.errors = 0 self.errors = 0
#self.warnings = 0 #self.warnings = 0
if args.has_key('fileoutput'): if args.has_key('fileoutput'):
self.fd = open(args['filename'], "w") self.fd = file(args['filename'], "w")
elif args.has_key('fd'): elif args.has_key('fd'):
self.fd = args['fd'] self.fd = args['fd']
else: else:

View file

@ -338,7 +338,7 @@ def autocomplete( parser,
# Print debug output (if needed). You can keep a shell with 'tail -f' to # Print debug output (if needed). You can keep a shell with 'tail -f' to
# the log file to monitor what is happening. # the log file to monitor what is happening.
if debugfn: if debugfn:
f = open(debugfn, 'a') f = file(debugfn, 'a')
print >> f, '---------------------------------------------------------' print >> f, '---------------------------------------------------------'
print >> f, 'CWORDS', cwords print >> f, 'CWORDS', cwords
print >> f, 'CLINE', cline print >> f, 'CLINE', cline

View file

@ -18,4 +18,4 @@ class SZ_FCGI:
thread.start_new_thread(self.func,(self, req)) thread.start_new_thread(self.func,(self, req))
except: except:
import traceback import traceback
traceback.print_exc(file = open('traceback', 'a')) traceback.print_exc(file=file('traceback', 'a'))