]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool.py: Fix an undefined function name.
authorCollin Funk <collin.funk1@gmail.com>
Sat, 4 May 2024 00:26:18 +0000 (17:26 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Sat, 4 May 2024 00:27:43 +0000 (17:27 -0700)
* 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.

ChangeLog
pygnulib/main.py

index 2781a7080087001a61fdca1401aa7f7c1ae329ce..96b29b7fc415ba5844361b02e077c01599df8d61 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-05-03  Collin Funk  <collin.funk1@gmail.com>
+
+       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  <simon@josefsson.org>
 
        maint.mk: Don't fail on ~/.indent.pro, reported by Collin Funk.
index d429a2c47e3dfae3c18a3db0a4c11e9711540511..66bd67ea595c6f42edbf8ccf4761c56aa60107e6 100644 (file)
@@ -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'