Skip to content

Commit

Permalink
Make sure package logs always get commited (#53)
Browse files Browse the repository at this point in the history
* Pre-log package being scanned

* Fix: database not being updated

* Lint

* Fix: improper version

* Remove extraneous log
  • Loading branch information
Robin5605 authored Apr 30, 2023
1 parent dfd75c3 commit e1547cc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Changelog
=========

- :release:`2.6.0 <25th April 2023>`
- :release:`2.0.0 <25th April 2023>`
:feature:`48` Conform to API rewrite

- :release:`1.6.0 <17th April 2023>`
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "alessia"
version = "2.6.0"
version = "2.0.0"
dependencies = [
"python-dotenv==1.0.0",
"discord.py==2.2.2",
Expand Down
4 changes: 4 additions & 0 deletions src/bot/exts/dragonfly/dragonfly.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ async def run(

# Package is safe
if result is None:
session.add(pypi_package_scan)
session.commit()
log.info(
"Package %s has no distribution with the highest score (all are 0), it is not malicious",
package_metadata.title,
Expand All @@ -226,6 +228,8 @@ async def run(

distribution = result.highest_score_distribution
if distribution is None:
session.add(pypi_package_scan)
session.commit()
log.info("Package %s has no files with score greater than 0", result.name)
continue

Expand Down

0 comments on commit e1547cc

Please sign in to comment.