2019-08-26 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in the 'pypad_filewrite.py' PyPAD script that caused
	an infinite loop.
This commit is contained in:
Fred Gleason
2019-08-27 16:48:05 -04:00
parent 4503d33526
commit b19f2a9d6b
2 changed files with 16 additions and 15 deletions

View File

@@ -18981,3 +18981,6 @@
2019-08-26 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in the 'pypad_ando.py' PyPAD script that caused
an infinite loop.
2019-08-26 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in the 'pypad_filewrite.py' PyPAD script that caused
an infinite loop.

View File

@@ -4,7 +4,7 @@
#
# Write PAD updates to files
#
# (C) Copyright 2018 Fred Gleason <fredg@paravelsystems.com>
# (C) Copyright 2018-2019 Fred Gleason <fredg@paravelsystems.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -29,9 +29,8 @@ def eprint(*args,**kwargs):
def ProcessPad(update):
n=1
try:
while(True):
section='File'+str(n)
while(update.config().has_section(section)):
if update.shouldBeProcessed(section):
fmtstr=update.config().get(section,'FormatString')
mode='w'
@@ -41,9 +40,8 @@ def ProcessPad(update):
f.write(update.resolvePadFields(fmtstr,int(update.config().get(section,'Encoding'))))
f.close()
n=n+1
section='File'+str(n)
except configparser.NoSectionError:
return
#
# 'Main' function