Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
huakim authored Apr 12, 2024
1 parent ae596e3 commit 6365ee9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions py2pack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,13 @@ def generate(args):


def fetch_data(args):
localfile = args.localfile
local = args.local
#fix bug: AttributeError: 'Namespace' object has no attribute 'localfile' for fetch command
try:
localfile = args.localfile
local = args.local
except AttributeError:
localfile = ''
local = False

if not localfile and local:
localfile = f'{args.name}.egg-info/PKG-INFO'
Expand Down

0 comments on commit 6365ee9

Please sign in to comment.