diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-01-10 15:33:10 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-01-10 15:33:10 +0100 |
| commit | d5c0cd45ea8966416ebf0d62ae8320ce54fde501 (patch) | |
| tree | 2502ce25689d6c37e43639207dbd640b6ca78551 /src/philo/philo.py | |
| parent | a28ed0f25620c6205516259609ad73d7d70b5ffd (diff) | |
| download | philosophers_test-d5c0cd45ea8966416ebf0d62ae8320ce54fde501.tar.gz philosophers_test-d5c0cd45ea8966416ebf0d62ae8320ce54fde501.tar.bz2 philosophers_test-d5c0cd45ea8966416ebf0d62ae8320ce54fde501.zip | |
Fixing timestamp parsing
Diffstat (limited to 'src/philo/philo.py')
| -rw-r--r-- | src/philo/philo.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/philo/philo.py b/src/philo/philo.py index 3319a0b..0e62e97 100644 --- a/src/philo/philo.py +++ b/src/philo/philo.py @@ -6,7 +6,7 @@ # By: cacharle <me@cacharle.xyz> +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/10/01 10:52:56 by cacharle #+# #+# # -# Updated: 2020/10/05 14:03:07 by cacharle ### ########.fr # +# Updated: 2021/01/03 13:31:54 by cacharle ### ########.fr # # # # ############################################################################ # @@ -56,10 +56,10 @@ class Philo: # check log event number grouped = [(e, list(g)) for e, g in itertools.groupby(self.logs, (lambda x: x.event))] for e, g in grouped[:-1]: - if e is Event.EAT: - if len(g) != self._meal_num: - self._raise("Should eat {} times".format(self._meal_num)) - elif e is Event.FORK: + # if e is Event.EAT: + # if len(g) != self._meal_num: + # self._raise("Should eat {} times".format(self._meal_num)) + if e is Event.FORK: if len(g) != 2: self._raise("Should take fork 2 times") elif len(g) != 1: |
