diff cutils/shasum.py @ 164:a813094ae4f5

Move PY2 from cutils.util.constants into cutils.util
author Franz Glasner <fzglas.hg@dom66.de>
date Thu, 09 Jan 2025 13:48:57 +0100
parents 1e5127028254
children ffd14e2de130
line wrap: on
line diff
--- a/cutils/shasum.py	Thu Jan 09 13:40:33 2025 +0100
+++ b/cutils/shasum.py	Thu Jan 09 13:48:57 2025 +0100
@@ -24,7 +24,6 @@
 
 from . import (__version__, __revision__)
 from . import util
-from .util import constants
 from .util import digest
 
 
@@ -174,7 +173,7 @@
                         opts.base64)
     else:
         if not opts.files or (len(opts.files) == 1 and opts.files[0] == '-'):
-            if constants.PY2:
+            if util.PY2:
                 if sys.platform == "win32":
                     import msvcrt   # noqa: E401
                     msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
@@ -243,7 +242,7 @@
     dest = opts.dest or sys.stdout
     exit_code = 0
     if not opts.files or (len(opts.files) == 1 and opts.files[0] == '-'):
-        if constants.PY2:
+        if util.PY2:
             if sys.platform == "win32":
                 import os, msvcrt   # noqa: E401
                 msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)