From: Collin Funk Date: Sat, 4 May 2024 00:26:18 +0000 (-0700) Subject: gnulib-tool.py: Fix an undefined function name. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=b86d31ade5e8284df1efe339890b674eedf89bcd;p=gnulib.git gnulib-tool.py: Fix an undefined function name. * pygnulib/main.py (main_with_exception_handling): Use the tempfile module prefix when calling mkdtemp(). Use the 'glpy' prefix for the temporary directory that exists for the entirety of the program. --- diff --git a/ChangeLog b/ChangeLog index 2781a70800..96b29b7fc4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2024-05-03 Collin Funk + + gnulib-tool.py: Fix an undefined function name. + * pygnulib/main.py (main_with_exception_handling): Use the tempfile + module prefix when calling mkdtemp(). Use the 'glpy' prefix for the + temporary directory that exists for the entirety of the program. + 2024-05-03 Simon Josefsson maint.mk: Don't fail on ~/.indent.pro, reported by Collin Funk. diff --git a/pygnulib/main.py b/pygnulib/main.py index d429a2c47e..66bd67ea59 100644 --- a/pygnulib/main.py +++ b/pygnulib/main.py @@ -1364,7 +1364,7 @@ def main(temp_directory: str) -> None: def main_with_exception_handling() -> None: try: # Try to execute - with tempfile.TemporaryDirectory() as temporary_directory: + with tempfile.TemporaryDirectory(prefix='glpy') as temporary_directory: main(temporary_directory) except GLError as error: errmode = 0 # gnulib-style errors @@ -1404,7 +1404,7 @@ def main_with_exception_handling() -> None: incompatibilities += pair[0] incompatibilities += ' %s' % pair[1] incompatibilities += '\n' - tempname = mktemp() + tempname = tempfile.mktemp() with open(tempname, mode='w', newline='\n', encoding='utf-8') as file: file.write(incompatibilities) sed_table = 's,^\\([^ ]*\\) ,\\1' + ' ' * 51 + ',\n'