Fix T49080: Blender Cloud add-on error uploading screenshot

The screenshot filename contained colons, which isn't allowed on Windows.
This commit is contained in:
Sybren A. Stüvel 2016-08-23 14:40:41 +02:00
parent 38a3bcba71
commit 2388f800dc

View File

@ -287,7 +287,7 @@ class PILLAR_OT_image_share(pillar.PillarOperatorMixin,
async def upload_screenshot(self, context) -> pillarsdk.Node: async def upload_screenshot(self, context) -> pillarsdk.Node:
"""Takes a screenshot, saves it to a temp file, and uploads it.""" """Takes a screenshot, saves it to a temp file, and uploads it."""
self.name = datetime.datetime.now().strftime('Screenshot-%Y-%m-%d-%H:%M:%S.png') self.name = datetime.datetime.now().strftime('Screenshot-%Y-%m-%d-%H%M%S.png')
self.report({'INFO'}, "Uploading %s '%s'" % (self.target.lower(), self.name)) self.report({'INFO'}, "Uploading %s '%s'" % (self.target.lower(), self.name))
with tempfile.TemporaryDirectory() as tmpdir: with tempfile.TemporaryDirectory() as tmpdir: