Skip to content

Commit

Permalink
serialization: handle config values better (allow options to default …
Browse files Browse the repository at this point in the history
…when they are None)
  • Loading branch information
isidentical committed Jun 1, 2021
1 parent 4dfa8f3 commit 692c824
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reiz/serialization/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def pool(self):

@cached_property
def limit(self):
return self.properties.get("hard_limit", math.inf)
return self.properties.get("hard_limit") or math.inf


@dataclass
Expand All @@ -100,7 +100,7 @@ def path(self):

@cached_property
def limit(self):
return self.properties.get("max_files", math.inf)
return self.properties.get("max_files") or math.inf

def cache(self):
self.db_cache.projects.add(self.project.name)
Expand Down

0 comments on commit 692c824

Please sign in to comment.