We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be67f88 commit dc5d2d6Copy full SHA for dc5d2d6
sdk/diffgram/core/directory.py
@@ -194,9 +194,10 @@ def new(self, name: str):
194
# Confirm not in existing
195
# generator expression returns True if the directory
196
# is not found. this is a bit awkward.
197
- if next((dir for dir in self.client.directory_list
198
- if dir.nickname == name), True) is not True:
199
- raise Exception(name, "Already exists")
+ if self.client.directory_list:
+ if next((dir for dir in self.client.directory_list
+ if dir.nickname == name), True) is not True:
200
+ raise Exception(name, "Already exists")
201
202
packet = {'nickname': name}
203
0 commit comments