Skip to content

Commit

Permalink
Added __name__ argument to file mixin.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Fulton committed Mar 30, 1999
1 parent e4426d4 commit ddbefd4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions DT_String.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
# attributions are listed in the accompanying credits file.
#
##############################################################################
"$Id: DT_String.py,v 1.23 1999/03/25 20:30:56 jim Exp $"
"$Id: DT_String.py,v 1.24 1999/03/30 18:26:34 jim Exp $"

from string import split, strip
import regex, ts_regex
Expand Down Expand Up @@ -527,7 +527,7 @@ class FileMixin:
String.__state_names__ +
('edited_source',))

def __init__(self, file_name='', mapping=None, **vars):
def __init__(self, file_name='', mapping=None, __name__='', **vars):
"""\
Create a document template based on a named file.
Expand All @@ -536,7 +536,7 @@ def __init__(self, file_name='', mapping=None, **vars):
"""
self.raw=file_name
self.initvars(mapping, vars)
self.setName(file_name)
self.setName(__name__ or file_name)

def read_raw(self):
if self.edited_source: return self.edited_source
Expand Down

0 comments on commit ddbefd4

Please sign in to comment.