1.1 --- a/bytecode.py Thu Dec 09 19:44:31 2004 +0100
1.2 +++ b/bytecode.py Thu Dec 09 20:50:19 2004 +0100
1.3 @@ -1924,7 +1924,11 @@
1.4 "Initialise the object with the given 'class_file'."
1.5
1.6 self.class_file = class_file
1.7 - self.filename = str(self.class_file.attributes[0].get_name())
1.8 + self.filename = ""
1.9 +
1.10 + for attribute in self.class_file.attributes:
1.11 + if isinstance(attribute, classfile.SourceFileAttributeInfo):
1.12 + self.filename = str(attribute.get_name())
1.13
1.14 def translate_method(self, method):
1.15