Skip to content

Commit

Permalink
Update base.py
Browse files Browse the repository at this point in the history
Fix bug 可能存在文件夹不存在的情况
  • Loading branch information
GT-ZhangAcer committed Feb 22, 2024
1 parent 7bdb63c commit 272fb29
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions qpt/modules/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,12 @@ def existing_offline_installation_packages(self):
存在的离线package
:return:
"""
whl_list = [whl for whl in os.listdir(self.download_packages_path)
if os.path.splitext(whl)[-1] in [".gz", ".whl", "zip"]]
return whl_list
if not os.path.exists(self.download_packages_path):
return list()
else:
whl_list = [whl for whl in os.listdir(self.download_packages_path)
if os.path.splitext(whl)[-1] in [".gz", ".whl", "zip"]]
return whl_list

@property
def uninstalled_offline_installation_packages(self):
Expand Down

0 comments on commit 272fb29

Please sign in to comment.