# HG changeset patch # User Paul Boddie # Date 1102621819 -3600 # Node ID ed62337d311fef62939a2765da987d7d6d7402be # Parent 6379c132fad27ea36f8f0c7a467aea7ae9dadb54 Fixed source code filename acquisition. diff -r 6379c132fad2 -r ed62337d311f bytecode.py --- a/bytecode.py Thu Dec 09 19:44:31 2004 +0100 +++ b/bytecode.py Thu Dec 09 20:50:19 2004 +0100 @@ -1924,7 +1924,11 @@ "Initialise the object with the given 'class_file'." self.class_file = class_file - self.filename = str(self.class_file.attributes[0].get_name()) + self.filename = "" + + for attribute in self.class_file.attributes: + if isinstance(attribute, classfile.SourceFileAttributeInfo): + self.filename = str(attribute.get_name()) def translate_method(self, method):