Skip to content

Commit 42595d0

Browse files
committed
fix: Empty repositories
Add a more specific testing strategy for empty repositories
1 parent 76bccd6 commit 42595d0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

github2pandas/utility.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,11 @@ def check_for_updates_paginated(new_paginated_list, old_df):
118118
if old_df.empty:
119119
# .totalCount crashes in case of a total empty repository
120120
try:
121-
new_paginated_list.totalCount == 0
121+
count = new_paginated_list.totalCount
122122
except:
123123
return False
124+
if count == 0:
125+
return False
124126
return True
125127
if not new_paginated_list.totalCount == old_df.count()[0]:
126128
return True

0 commit comments

Comments
 (0)