5e1c611d7027 default tip

The Hamster Wheel of Backwards Incompatibility turns ever on
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Thu, 25 Aug 2022 19:29:43 -0400
parents f8aba4c6bcbc
children (none)
branches/tags default tip
files ffind

Changes

--- a/ffind	Tue Jan 14 19:46:54 2020 -0500
+++ b/ffind	Thu Aug 25 19:29:43 2022 -0400
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf8 -*-
 
 #    ____  ____  __  ____  __ _  ____  __    _  _     ____  __  __ _  ____
@@ -458,8 +458,8 @@
                 # don't hang while waiting for their full kb.
                 # TODO: Ignore those altogether for the binary check?
                 fd = os.open(target, os.O_NONBLOCK)
-                with os.fdopen(fd) as f:
-                    if '\0' in f.read(1024):
+                with os.fdopen(fd, 'rb') as f:
+                    if 0 in f.read(1024):
                         return False
 
         return True