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 f16017a commit c27e3c7Copy full SHA for c27e3c7
addon/globalPlugins/CloudVision/__init__.py
@@ -585,7 +585,8 @@ def script_analyzeClipboard(self, gesture):
585
global fileName
586
try:
587
fileExtension="png"
588
- tpng = tempfile.mktemp(suffix="."+fileExtension)
+ tpngfp = tempfile.NamedTemporaryFile(suffix="."+fileExtension)
589
+ tpng = tpngfp.name
590
filePath = tpng
591
fileName = os.path.basename(filePath)
592
b=get_image_from_clipboard()
@@ -598,6 +599,7 @@ def script_analyzeClipboard(self, gesture):
598
599
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