file.write(filename + '\n')
session.rollback()
file.close()
- return message
+ return (PROC_STATUS_SUCCESS, message)
def writeAllList(suite_id, component_id, architecture_id, type, incremental_mode):
session = DBConn().session()
file.write(filename + '\n')
session.rollback()
file.close()
- return message
+ return (PROC_STATUS_SUCCESS, message)
def writeBinaryList(suite_id, component_id, architecture_id, type, incremental_mode):
session = DBConn().session()
file.write(filename + '\n')
session.rollback()
file.close()
- return message
+ return (PROC_STATUS_SUCCESS, message)
def usage():
print """Usage: dak generate_filelist [OPTIONS]
message = ["generate sources", suite.suite_name, component.component_name]
session.rollback()
- return message
+ return (PROC_STATUS_SUCCESS, message)
#############################################################################
message = ["generate-packages", suite.suite_name, component.component_name, architecture.arch_string]
session.rollback()
- return message
+ return (PROC_STATUS_SUCCESS, message)
#############################################################################
logger.close()
- sys.exit(pool.output_status())
+ sys.exit(pool.overall_status())
if __name__ == '__main__':
main()
if os.path.exists(htmlfile) and \
os.stat(htmlfile).st_mtime > os.stat(origchanges).st_mtime:
session.close()
- return
+ return (PROC_STATUS_SUCCESS, '%s already up-to-date' % htmlfile)
for deb_filename, f in files.items():
if deb_filename.endswith(".udeb") or deb_filename.endswith(".deb"):
outfile.close()
session.close()
+ return (PROC_STATUS_SUCCESS, '%s already updated' % htmlfile)
+
################################################################################
def usage (exit_code=0):
###############################################################################
from multiprocessing.pool import Pool
-from signal import signal, SIGHUP, SIGTERM, SIGPIPE, SIGCHLD, SIGALRM
+from signal import signal, SIGHUP, SIGTERM, SIGPIPE, SIGALRM
import sqlalchemy.orm.session
signal(SIGHUP, signal_handler)
signal(SIGTERM, signal_handler)
signal(SIGPIPE, signal_handler)
- signal(SIGCHLD, signal_handler)
signal(SIGALRM, signal_handler)
# We expect our callback function to return:
from os import kill, getpid
if num == 1:
- sigs = [signal.SIGTERM, signal.SIGCHLD, signal.SIGALRM, signal.SIGHUP]
+ sigs = [signal.SIGTERM, signal.SIGPIPE, signal.SIGALRM, signal.SIGHUP]
kill(getpid(), sigs[num2])
if num2 == 3:
(PROC_STATUS_SUCCESS, 'blah, 0, 2'),
(PROC_STATUS_EXCEPTION, 'Test uncaught exception handling'),
(PROC_STATUS_SIGNALRAISED, 15),
- (PROC_STATUS_SIGNALRAISED, 17),
+ (PROC_STATUS_SIGNALRAISED, 13),
(PROC_STATUS_SIGNALRAISED, 14),
(PROC_STATUS_SIGNALRAISED, 1),
(PROC_STATUS_SUCCESS, 'blah, 2, 0'),