585 except KeyError: |
585 except KeyError: |
586 if fn is None: |
586 if fn is None: |
587 return frame.f_code.co_filename |
587 return frame.f_code.co_filename |
588 |
588 |
589 absFilename = os.path.abspath(fn) |
589 absFilename = os.path.abspath(fn) |
590 if absFilename.endswith(('.pyc', '.pyo')): |
590 if absFilename.endswith(('.pyc', '.pyo', '.pyd')): |
591 fixedName = absFilename[:-1] |
591 fixedName = absFilename[:-1] |
592 if not os.path.exists(fixedName): |
592 if not os.path.exists(fixedName): |
593 fixedName = absFilename |
593 fixedName = absFilename |
594 else: |
594 else: |
595 fixedName = absFilename |
595 fixedName = absFilename |