diff cutils/util/glob.py @ 298:16a5c337fcb9

FIX: peeking for byte strings on Python3 needs to convert from int to bytes
author Franz Glasner <fzglas.hg@dom66.de>
date Tue, 04 Mar 2025 09:01:42 +0100
parents 141a3aa0b403
children 1371ceb6fad6
line wrap: on
line diff
--- a/cutils/util/glob.py	Tue Mar 04 01:52:18 2025 +0100
+++ b/cutils/util/glob.py	Tue Mar 04 09:01:42 2025 +0100
@@ -220,4 +220,6 @@
         if self._nch is not None:
             return self._nch
         self._nch = next(self._it, None)
+        if isinstance(self._nch, int):
+            self._nch = bytes((self._nch,))
         return self._nch