Skip to content

Commit

Permalink
better type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
shaneknapp committed Sep 27, 2023
1 parent 724e821 commit 41e9a17
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scripts/delete-unused-users.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
ok.
"""
import argparse
import inspect
from jhub_client.api import JupyterHubAPI
from dateutil.parser import parse
import asyncio
Expand Down Expand Up @@ -43,7 +42,7 @@ async def main():
print(user['last_activity'])
raise

if inspect.isclass(type(last_activity)):
if isinstance(last_activity, datetime):
was_active_last_day = datetime.now().astimezone() - last_activity < timedelta(hours=24)
else:
activity_type = type(last_activity)
Expand Down

0 comments on commit 41e9a17

Please sign in to comment.