Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit68ddb51

Browse files
committed
Merge branch '185-error-float-division-by-zero-hotfix' into dev
2 parents8333244 +6709608 commit68ddb51

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎mamonsu/lib/sender.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ def send(self, key, value, delta=None, host=None, clock=None, only_positive_spee
4141
last_value,last_time=self._last_values[hash_key]
4242
self._last_values[hash_key]= (value,clock)
4343
ifdelta==Plugin.DELTA.speed_per_second:
44-
value=float(value-last_value)/ (clock-last_time)
44+
iflast_time==clock:
45+
pass
46+
else:
47+
value=float(value-last_value)/ (clock-last_time)
4548
ifdelta==Plugin.DELTA.simple_change:
4649
value=float(value-last_value)
4750
else:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp