Browse Source

new cat every minute and close handle

rorist 5 months ago
parent
commit
cb5a0161dd
1 changed files with 2 additions and 1 deletions
  1. 2 1
      screend.py

+ 2 - 1
screend.py

@@ -108,7 +108,8 @@ def cat():
         for chunk in response.iter_content(chunk_size=512):
             if chunk:
                 handle.write(chunk)
-        time.sleep(300)
+        handle.close()
+        time.sleep(60)
 
 # Copied from humanize.naturalsize and s/bytes/bits/g
 def naturalsize(value, binary=False, gnu=False, format='%.1f'):