Skip to content

Commit

Permalink
Merge pull request #203 from zachspar/master
Browse files Browse the repository at this point in the history
fix: sanitize summary only if it exists
  • Loading branch information
danigm authored Jul 30, 2024
2 parents 513abea + cb865d8 commit c10961d
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 @@ -367,7 +367,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 c10961d

Please sign in to comment.