Skip to content

Commit

Permalink
Fixed Donor.py because I'm a dumbass who doesn't test shit
Browse files Browse the repository at this point in the history
  • Loading branch information
benjhar committed Oct 12, 2019
1 parent 11ae4df commit e8e2855
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions foldingathome/Donor.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@ def __init__(self, donorname, team=0):
found = True
if not found and team == 0:
raise Exception(
f"\n\nNo user could be fou nd with that name: {donorname}.\n This could be due to the user not being on the leaderboard for the default team, as the api only displays the top 1000 members of a team."
f"\n\nNo user could be found with that name: {donorname}.\n This could be due to the user not being on the leaderboard for the default team, as the api only displays the top 1000 members of a team."
)
return
elif not found:
raise Exception(f"\n\nNo user could be found with that name: {donorname}")
return

self.name = self.donor["name"]
self.id = self.donor["id"]
self.score = self.donor["score"]
self.work_units = self.donor["work_units"]
self.score = self.donor["credit"]
self.work_units = self.donor["wus"]
self.team_id = self.team["team"]

@property
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
setup(
name="foldingathome",
packages=["foldingathome"],
version="0.1.5",
version="0.1.6",
license="MIT Licence",
description="A Python wrapper for the Folding@Home API.",
author="leet_hakker",
author_email="[email protected]",
url="https://github.com/thenamesweretakenalready/foldingathome/",
download_url="https://github.com/thenamesweretakenalready/foldingathome/archive/v0.1.5.tar.gz",
download_url="https://github.com/thenamesweretakenalready/foldingathome/archive/v0.1.6.tar.gz",
keywords=["API wrapper", "Python", "Folding@Home"],
install_requires=["requests"],
classifiers=[
Expand Down

0 comments on commit e8e2855

Please sign in to comment.