File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
dongtai_agent_python/utils Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -89,15 +89,12 @@ def get_packages():
89
89
if os .path .exists (module_path ):
90
90
found = True
91
91
92
- if not found :
93
- try :
94
- top_level = package .get_metadata ('top_level.txt' ).splitlines ()
95
- if top_level :
96
- for lvl in top_level :
97
- if os .path .exists (package .location + os .sep + lvl ):
98
- module_path = package .location + os .sep + lvl
99
- except Exception :
100
- module_path = package .location + os .sep + package .project_name .lower ()
92
+ if not found and package .has_metadata ('top_level.txt' ):
93
+ top_level = package .get_metadata ('top_level.txt' ).splitlines ()
94
+ if top_level :
95
+ for lvl in top_level :
96
+ if os .path .exists (package .location + os .sep + lvl ):
97
+ module_path = package .location + os .sep + lvl
101
98
102
99
sha_1 = hashlib .sha1 ()
103
100
sha_1 .update (bytes (package .project_name .lower () + '-' + package .version , encoding = 'utf-8' ))
You can’t perform that action at this time.
0 commit comments