[pywin32-bugs] [ pywin32-Patches-886824 ] [Bug: 817035] Exception while browsing python path
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2004-01-31 05:35:55
|
Patches item #886824, was opened at 2004-01-29 12:34 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=886824&group_id=78018 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Maxim Sokolov (dzuki) Assigned to: Nobody/Anonymous (nobody) Summary: [Bug: 817035] Exception while browsing python path Initial Comment: Sorry for the previous patch, it wont work. When user browses python path Tools->Browse PythonPath the program throws exception in tools. BrowseProjects.HLICLBRItem.GetText when trying to display module-level functions. Proposed patch of browseProjects file at HLICLBRClass. __init__: Compare: (<)C: \Programs\Python23\Lib\site-packages\Pythonwin\pywin \tools\browseProjects.py (8130 bytes) with: (>)C:\Programs\Python-2.3. 3\Lib\site-packages\Pythonwin\pywin\tools\browseProjec ts.py (8239 bytes) 41,50c41,50 < try: < name = clbrclass.name < file = clbrclass.file < lineno = clbrclass.lineno < self.super = clbrclass.super < self.methods = clbrclass.methods < except AttributeError: < name = clbrclass < file = lineno = None < self.super = []; self.methods = {} --- > def get_attr(obj, attr, default_value): > if hasattr(obj, attr): > return obj.__dict__[attr] > else: > return default_value > name = get_attr(clbrclass, "name", clbrclass) > file = get_attr(clbrclass, "file", None) > lineno = get_attr(clbrclass, "lineno", None) > self.super = get_attr(clbrclass, "super", []) > self.methods = get_attr(clbrclass, "methods", {}) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=886824&group_id=78018 |