Fix StopIteration exception
This commit is contained in:
parent
af93c7ebde
commit
c75164e013
1 changed files with 4 additions and 1 deletions
|
|
@ -24,7 +24,10 @@ class Dect:
|
|||
|
||||
@property
|
||||
def temp_num_prefix(self):
|
||||
return next(self.fp.extensions.extensions_by_type("temp")).num
|
||||
try:
|
||||
return next(self.fp.extensions.extensions_by_type("temp")).num
|
||||
except StopIteration:
|
||||
return None
|
||||
|
||||
def load_temp_extensions(self):
|
||||
used_temp_extensions = self.c.find_users(lambda u: u.num.startswith(self.temp_num_prefix))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue