diff --git a/data/tools/pywmlx/autof.py b/data/tools/pywmlx/autof.py index f064f45d07aa..51a87fb7a73c 100644 --- a/data/tools/pywmlx/autof.py +++ b/data/tools/pywmlx/autof.py @@ -4,7 +4,7 @@ def autoscan(pathdir): - filelist = None + filelist = [] parentdir = os.path.realpath(os.path.join(pathdir, '..')) for root, dirs, files in os.walk(pathdir, topdown=False): for name in files: @@ -17,10 +17,7 @@ def autoscan(pathdir): value = re.sub(r'^\/', '', value) else: value = re.sub(r'^(?:[A-Za-z]\:)?\\', '', value) - if filelist is None: - filelist = [ value ] - else: - filelist.append(value) + filelist.append(value) # end if m # end for name # end for root diff --git a/data/tools/wmlxgettext b/data/tools/wmlxgettext index f5dfbe954ac5..072fbb0041b6 100755 --- a/data/tools/wmlxgettext +++ b/data/tools/wmlxgettext @@ -176,7 +176,6 @@ def main(): fdebug = open('debug.txt', 'w', encoding='utf-8') pywmlx.statemachine.setup(sentlist, args.initdom, args.domain, args.warnall, fdebug) - filelist = None if args.recursive is False and args.filelist is None: pywmlx.wmlerr("bad command line", "FILELIST must not be empty. " "Please, run wmlxgettext again and, this time, add some file "