]> granicus.if.org Git - python/commitdiff
SF #775057, fix IDLE problem in about dialog
authorNeal Norwitz <nnorwitz@gmail.com>
Tue, 28 Oct 2003 21:57:10 +0000 (21:57 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Tue, 28 Oct 2003 21:57:10 +0000 (21:57 +0000)
If the file doesn't exist, the code to display an error message was broken
Will backport.

Lib/idlelib/aboutDialog.py

index 8960b0054e1a3807dbc01171c525d78bcf4290f4..3d2bcf694d19aacf5293b8f9b71307922cf5836b 100644 (file)
@@ -139,9 +139,11 @@ class AboutDialog(Toplevel):
             try:
                 textFile = codecs.open(fn, 'r')
             except IOError:
+                import tkMessageBox
                 tkMessageBox.showerror(title='File Load Error',
                                        message='Unable to load file '+
-                                       `fileName`+' .')
+                                       `fn`+' .',
+                                       parent=self)
                 return
             else:
                 data = textFile.read()