File: 0006-Support-Python-3.10-s-2-digit-minor-version.patch

package info (click to toggle)
python-dmidecode 3.12.2-13
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,156 kB
  • sloc: ansic: 6,946; xml: 741; python: 595; makefile: 87; sh: 68
file content (23 lines) | stat: -rw-r--r-- 786 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From: Stefano Rivera <stefanor@debian.org>
Date: Fri, 19 Nov 2021 12:02:12 -0400
Subject: Support Python 3.10's 2-digit minor version

Forwarded: https://github.com/nima/python-dmidecode/pull/31
Bug-Debian: https://bugs.debian.org/999373
---
 unit-tests/unit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/unit-tests/unit b/unit-tests/unit
index 3b06c04..28d6b02 100755
--- a/unit-tests/unit
+++ b/unit-tests/unit
@@ -9,7 +9,7 @@ from getopt import getopt
 
 # Setup temporary sys.path() with our build dir
 (sysname, nodename, release, version, machine) = os.uname()
-pyver = sys.version[:3]
+pyver = '%i.%i' % sys.version_info[:2]
 sys.path.insert(0,'../build/lib.%s-%s-%s' % (sysname.lower(), machine, pyver))
 
 root_user = (os.getuid() == 0 and True or False)