Files
Joshua Root b2866c4611 doclifter: mark noarch, fix scripts
Fix shebangs, make manlifter python 3 compatible.
2023-12-24 15:17:07 +11:00

45 lines
1.3 KiB
Diff

--- manlifter (original)
+++ manlifter (refactored)
@@ -10,18 +10,18 @@
#
# SPDX-License-Identifier: BSD-2-Clause
-from __future__ import print_function
+
import sys, os, getopt, signal, time, re, subprocess, stat
-import thread, threading, Queue
+import _thread, threading, queue
try:
getstatusoutput = subprocess.getstatusoutput
getoutput = subprocess.getoutput
except AttributeError:
- import commands
- getstatusoutput = commands.getstatusoutput
- getoutput = commands.getoutput
+ import subprocess
+ getstatusoutput = subprocess.getstatusoutput
+ getoutput = subprocess.getoutput
mandir = "/usr/share/man"
patchdir = os.path.abspath("prepatch")
@@ -203,7 +203,7 @@
def singlerun(fn, options, tmpstem=None, batchmode=False):
"Test-format a single file."
if tmpstem is None:
- tmpstem = "foo" + repr(os.getpid()) + ":" + str(thread.get_ident())
+ tmpstem = "foo" + repr(os.getpid()) + ":" + str(_thread.get_ident())
global patched
foundpatch = False
if not os.path.exists(fn):
@@ -387,7 +387,7 @@
else:
print("%Profiling not enabled.\n")
try:
- q = Queue.Queue(maxsize=WORKERS)
+ q = queue.Queue(maxsize=WORKERS)
def stuffone(fn):
(status, output) = test(fn=fn, options=options)