From 76452953f8d42bdbd8e95d3a00a22428435e91fc Mon Sep 17 00:00:00 2001 From: calvin Date: Thu, 29 Jan 2004 19:04:49 +0000 Subject: [PATCH] use file instead of open git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1226 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- linkcheck/log/StandardLogger.py | 2 +- linkcheck/optcomplete.py | 2 +- linkcheck/sz_fcgi.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/linkcheck/log/StandardLogger.py b/linkcheck/log/StandardLogger.py index 7f57735e..9525b825 100644 --- a/linkcheck/log/StandardLogger.py +++ b/linkcheck/log/StandardLogger.py @@ -60,7 +60,7 @@ __init__(self, **args) self.errors = 0 #self.warnings = 0 if args.has_key('fileoutput'): - self.fd = open(args['filename'], "w") + self.fd = file(args['filename'], "w") elif args.has_key('fd'): self.fd = args['fd'] else: diff --git a/linkcheck/optcomplete.py b/linkcheck/optcomplete.py index d35d748b..0593fbb5 100644 --- a/linkcheck/optcomplete.py +++ b/linkcheck/optcomplete.py @@ -338,7 +338,7 @@ def autocomplete( parser, # Print debug output (if needed). You can keep a shell with 'tail -f' to # the log file to monitor what is happening. if debugfn: - f = open(debugfn, 'a') + f = file(debugfn, 'a') print >> f, '---------------------------------------------------------' print >> f, 'CWORDS', cwords print >> f, 'CLINE', cline diff --git a/linkcheck/sz_fcgi.py b/linkcheck/sz_fcgi.py index 611b97d3..b952d89d 100644 --- a/linkcheck/sz_fcgi.py +++ b/linkcheck/sz_fcgi.py @@ -18,4 +18,4 @@ class SZ_FCGI: thread.start_new_thread(self.func,(self, req)) except: import traceback - traceback.print_exc(file = open('traceback', 'a')) + traceback.print_exc(file=file('traceback', 'a'))