You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2023/12/24 21:28:22 UTC
svn commit: r1914913 - /subversion/trunk/tools/hook-scripts/mailer/mailer.py
Author: gstein
Date: Sun Dec 24 21:28:22 2023
New Revision: 1914913
URL: http://svn.apache.org/viewvc?rev=1914913&view=rev
Log:
Switch to boolean return values for .generate() rather than an exit
code. Map the bool to an exit code for sys.exit()
* tools/hook-scripts/mailer/mailer.py:
(Commit.generate): return FAILED as its existing boolean value
(PropChange.generate): return FAILED as its existing boolean value
(Lock.generate): return FAILED as its existing boolean value
(__main__): use FAILED for the return value, update sys.exit()
Modified:
subversion/trunk/tools/hook-scripts/mailer/mailer.py
Modified: subversion/trunk/tools/hook-scripts/mailer/mailer.py
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/hook-scripts/mailer/mailer.py?rev=1914913&r1=1914912&r2=1914913&view=diff
==============================================================================
--- subversion/trunk/tools/hook-scripts/mailer/mailer.py (original)
+++ subversion/trunk/tools/hook-scripts/mailer/mailer.py Sun Dec 24 21:28:22 2023
@@ -545,7 +545,7 @@ class Commit(Messenger):
svn.core.svn_pool_clear(iterpool)
svn.core.svn_pool_destroy(iterpool)
- return int(failed)
+ return failed
class PropChange(Messenger):
@@ -602,7 +602,7 @@ class PropChange(Messenger):
writer.write(to_str(diffs.raw))
failed |= output.send(subject_line, group, params, long_propchange, None)
- return int(failed)
+ return failed
def get_commondir(dirlist):
@@ -701,7 +701,7 @@ class Lock(Messenger):
failed |= output.send(subject_line, group, params, long_lock, None)
- return int(failed)
+ return failed
class DiffSelections:
@@ -1516,9 +1516,9 @@ if the property was added, modified or d
if not os.path.exists(config_fname):
raise MissingConfig(config_fname)
- ret = svn.core.run_app(main, cmd, config_fname, repos_dir,
- sys.argv[3:3+expected_args])
- sys.exit(1 if ret else 0)
+ failed = svn.core.run_app(main, cmd, config_fname, repos_dir,
+ sys.argv[3:3+expected_args])
+ sys.exit(1 if failed else 0)
# ------------------------------------------------------------------------