From 6365ee963a0b1e45cb2bf5477c24adbe41c86158 Mon Sep 17 00:00:00 2001 From: huakim <92579808+huakim@users.noreply.github.com> Date: Fri, 12 Apr 2024 17:39:00 +0000 Subject: [PATCH] Update __init__.py --- py2pack/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/py2pack/__init__.py b/py2pack/__init__.py index 5c0dc81..1e37de7 100644 --- a/py2pack/__init__.py +++ b/py2pack/__init__.py @@ -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'