We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c27e3c7 commit 9fffedcCopy full SHA for 9fffedc
addon/globalPlugins/CloudVision/__init__.py
@@ -585,8 +585,7 @@ def script_analyzeClipboard(self, gesture):
585
global fileName
586
try:
587
fileExtension="png"
588
- tpngfp = tempfile.NamedTemporaryFile(suffix="."+fileExtension)
589
- tpng = tpngfp.name
+ tpng = tempfile.mkstemp(suffix="."+fileExtension)[1]
590
filePath = tpng
591
fileName = os.path.basename(filePath)
592
b=get_image_from_clipboard()
@@ -599,7 +598,6 @@ def script_analyzeClipboard(self, gesture):
599
598
except:
600
log.exception("script error")
601
finally:
602
- tpngfp.close()
603
if os.path.isfile(tpng): os.remove(tpng)
604
filePath = ""
605
fileExtension = ""
0 commit comments