From 584ee2218b74a9c7f4127c922cc2c33dc5a706b4 Mon Sep 17 00:00:00 2001 From: Dora Morolli Date: Tue, 25 Jul 2023 14:36:46 +1200 Subject: [PATCH] Fix for python2 rounding --- src/fileseq/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fileseq/utils.py b/src/fileseq/utils.py index 7e84817..449540c 100644 --- a/src/fileseq/utils.py +++ b/src/fileseq/utils.py @@ -405,7 +405,7 @@ def pad(number, width=0, decimal_places=None): # https://github.com/PixarAnimationStudios/USD/blob/release/pxr/usd/usd/clipSetDefinition.cpp if decimal_places == 0: try: - number = round(number) + number = round(number) or 0 except TypeError: pass return futils.native_str(number).partition(".")[0].zfill(width)