Skip to content

Commit 85d7699

Browse files
committed
leading 0s format
1 parent b57c955 commit 85d7699

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_pycamera/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ def open_next_image(self, extension="jpg", filename_prefix="img"):
827827
except OSError as exc: # no SD card!
828828
raise RuntimeError("No SD card mounted") from exc
829829
while True:
830-
filename = f"/sd/{filename_prefix}{self._image_counter}.{extension}"
830+
filename = f"/sd/{filename_prefix}{self._image_counter:04d}.{extension}"
831831
self._image_counter += 1
832832
try:
833833
os.stat(filename)

0 commit comments

Comments
 (0)