Skip to content

Commit

Permalink
Add review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mariapython committed Dec 21, 2017
1 parent b7de0ec commit 2df1e91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdks/python/apache_beam/transforms/trigger.py
Expand Up @@ -378,8 +378,8 @@ class AfterCount(TriggerFn):
COUNT_TAG = _CombiningValueStateTag('count', combiners.CountCombineFn())

def __init__(self, count):
if count == 0:
raise ValueError("count (%s) must be a non-zero natural number." % count)
if not isinstance(count, int) or count < 1:
raise ValueError("count (%d) must be a non-zero natural number." % count)
self.count = count

def __repr__(self):
Expand Down

0 comments on commit 2df1e91

Please sign in to comment.