Skip to content

Commit

Permalink
Fixed #1993 - Update the partition statements into single statements
Browse files Browse the repository at this point in the history
  • Loading branch information
chinyeungli committed Apr 14, 2020
1 parent 3af6f67 commit 426b74b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/packagedcode/npm.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,8 +832,7 @@ def build_packages_from_lockfile(package_data):
namespace = None
name = dependency
if '/' in dependency:
namespace = dependency.partition('/')[0]
name = dependency.partition('/')[2]
namespace, _slash, name = dependency.partition('/')
# Handle the case where an entry in `dependencies` from a
# package-lock.json file has `requires`
for dep, dep_req in values.get('requires', {}).items():
Expand Down

0 comments on commit 426b74b

Please sign in to comment.