[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnulib-tool.py: Fix extra arguments to function call.
From: |
Collin Funk |
Subject: |
gnulib-tool.py: Fix extra arguments to function call. |
Date: |
Sat, 13 Apr 2024 10:12:45 -0700 |
User-agent: |
Mozilla Thunderbird |
I see a warning for this section of code because isfile() is called
with two arguments. It looks like the correct way to write this is to
joinpath() the two arguments, since that is what is done in
self.assistant.super_update() when not self.config['dryrun'].
diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py
index d44ceedcec..098bbc59ac 100644
--- a/pygnulib/GLImport.py
+++ b/pygnulib/GLImport.py
@@ -1230,7 +1230,7 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix
os.remove(tmpfile)
else: # if not self.config['dryrun']
backupname = '%s~' % basename
- if isfile(destdir, basename):
+ if isfile(joinpath(destdir, basename)):
print('Update %s (backup in %s)' % (basename, backupname))
else: # if not isfile(destdir, basename)
print('Create %s' % basename)
Collin
0001-gnulib-tool.py-Fix-extra-arguments-to-function-call.patch
Description: Text Data