Skip to content

Commit

Permalink
fix: sanitize summary only if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
zachspar committed Jul 28, 2024
1 parent ae596e3 commit 426a05a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py2pack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def generate(args):
source_url = data['source_url'] = (args.source_url or (durl and durl['url']))
data['year'] = datetime.datetime.now().year # set current year
data['user_name'] = pwd.getpwuid(os.getuid())[4] # set system user (packager)
data['summary_no_ending_dot'] = re.sub(r'(.*)\.', r'\g<1>', data.get('summary', ""))
data['summary_no_ending_dot'] = re.sub(r'(.*)\.', r'\g<1>', data.get('summary')) if data.get('summary') else ""

# If package name supplied on command line differs in case from PyPI's one
# then package archive will be fetched but the name will be the one from PyPI.
Expand Down

0 comments on commit 426a05a

Please sign in to comment.