mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-22 22:43:05 +02:00
2019-08-14 Fred Gleason <fredg@paravelsystems.com>
* Refactored the 'pypad.Update.shouldBeProcessed()' method to be LBYL.
This commit is contained in:
@@ -18925,3 +18925,5 @@
|
|||||||
the fixed 'pypad.update.shouldBeProcessed()' method.
|
the fixed 'pypad.update.shouldBeProcessed()' method.
|
||||||
* Refactored the 'pypad_shoutcast2.py' script to work properly with
|
* Refactored the 'pypad_shoutcast2.py' script to work properly with
|
||||||
the fixed 'pypad.update.shouldBeProcessed()' method.
|
the fixed 'pypad.update.shouldBeProcessed()' method.
|
||||||
|
2019-08-14 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Refactored the 'pypad.Update.shouldBeProcessed()' method to be LBYL.
|
||||||
|
@@ -726,38 +726,42 @@ class Update(object):
|
|||||||
to take the parameters.
|
to take the parameters.
|
||||||
"""
|
"""
|
||||||
result=True
|
result=True
|
||||||
try:
|
if self.__config.has_section(section):
|
||||||
if self.__config.get(section,'ProcessNullUpdates')=='0':
|
if self.__config.has_option(section,'ProcessNullUpdates'):
|
||||||
|
if self.__config.get(section,'ProcessNullUpdates')=='0':
|
||||||
|
result=result and True
|
||||||
|
if self.__config.get(section,'ProcessNullUpdates')=='1':
|
||||||
|
result=result and self.hasPadType(pypad.TYPE_NOW)
|
||||||
|
if self.__config.get(section,'ProcessNullUpdates')=='2':
|
||||||
|
result=result and self.hasPadType(pypad.TYPE_NEXT)
|
||||||
|
if self.__config.get(section,'ProcessNullUpdates')=='3':
|
||||||
|
result=result and self.hasPadType(pypad.TYPE_NOW) and self.hasPadType(pypad.TYPE_NEXT)
|
||||||
|
else:
|
||||||
result=result and True
|
result=result and True
|
||||||
if self.__config.get(section,'ProcessNullUpdates')=='1':
|
|
||||||
result=result and self.hasPadType(pypad.TYPE_NOW)
|
|
||||||
if self.__config.get(section,'ProcessNullUpdates')=='2':
|
|
||||||
result=result and self.hasPadType(pypad.TYPE_NEXT)
|
|
||||||
if self.__config.get(section,'ProcessNullUpdates')=='3':
|
|
||||||
result=result and self.hasPadType(pypad.TYPE_NOW) and self.hasPadType(pypad.TYPE_NEXT)
|
|
||||||
except configparser.NoOptionError:
|
|
||||||
result=result and True
|
|
||||||
except configparser.NoSectionError:
|
|
||||||
result=result and True
|
|
||||||
|
|
||||||
log_dict={1: 'MasterLog',2: 'Aux1Log',3: 'Aux2Log',
|
log_dict={1: 'MasterLog',2: 'Aux1Log',3: 'Aux2Log',
|
||||||
101: 'VLog101',102: 'VLog102',103: 'VLog103',104: 'VLog104',
|
101: 'VLog101',102: 'VLog102',103: 'VLog103',104: 'VLog104',
|
||||||
105: 'VLog105',106: 'VLog106',107: 'VLog107',108: 'VLog108',
|
105: 'VLog105',106: 'VLog106',107: 'VLog107',108: 'VLog108',
|
||||||
109: 'VLog109',110: 'VLog110',111: 'VLog111',112: 'VLog112',
|
109: 'VLog109',110: 'VLog110',111: 'VLog111',112: 'VLog112',
|
||||||
113: 'VLog113',114: 'VLog114',115: 'VLog115',116: 'VLog116',
|
113: 'VLog113',114: 'VLog114',115: 'VLog115',116: 'VLog116',
|
||||||
117: 'VLog117',118: 'VLog118',119: 'VLog119',120: 'VLog120'}
|
117: 'VLog117',118: 'VLog118',119: 'VLog119',120: 'VLog120'}
|
||||||
try:
|
option=log_dict[self.machine()]
|
||||||
#print('machine(): '+str(self.machine()))
|
if self.__config.has_option(section,option):
|
||||||
if self.__config.get(section,log_dict[self.machine()]).lower()=='yes':
|
if self.__config.get(section,option).lower()=='yes':
|
||||||
result=result and True
|
result=result and True
|
||||||
if self.__config.get(section,log_dict[self.machine()]).lower()=='no':
|
else:
|
||||||
|
if self.__config.get(section,option).lower()=='no':
|
||||||
|
result=result and False
|
||||||
|
else:
|
||||||
|
if self.__config.get(section,option).lower()=='onair':
|
||||||
|
result=result and self.onairFlag()
|
||||||
|
else:
|
||||||
|
result=result and False
|
||||||
|
else:
|
||||||
result=result and False
|
result=result and False
|
||||||
if self.__config.get(section,log_dict[self.machine()]).lower()=='onair':
|
else:
|
||||||
result=result and self.onairFlag()
|
|
||||||
except configparser.NoOptionError:
|
|
||||||
result=result and False
|
|
||||||
except configparser.NoSectionError:
|
|
||||||
result=result and False
|
result=result and False
|
||||||
|
#print('machine(): '+str(self.machine()))
|
||||||
#print('result: '+str(result))
|
#print('result: '+str(result))
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user