From 823f058d7b61bc7c23ff30da66ca2e1688aa2625 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Tue, 5 Nov 2024 13:48:23 -0500 Subject: [PATCH] 2024-11-05 Fred Gleason * Fixed a regression in rdautoback(8) that caused it to crash when run on Python 3.6. * Fixed a regression in rdautorest(8) that caused it to crash when run on Python 3.6. Signed-off-by: Fred Gleason --- ChangeLog | 5 +++++ utils/rdautoback/rdautoback.py | 4 ++-- utils/rdautorest/rdautorest.py | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 853ae7e0..36addb11 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24925,3 +24925,8 @@ * Incremented the package version to 4.3.0int6. 2024-10-23 Fred Gleason * Added an 'hpiplayout_test' command in 'tests/'. +2024-11-05 Fred Gleason + * Fixed a regression in rdautoback(8) that caused it to crash when + run on Python 3.6. + * Fixed a regression in rdautorest(8) that caused it to crash when + run on Python 3.6. diff --git a/utils/rdautoback/rdautoback.py b/utils/rdautoback/rdautoback.py index 0ed35010..c3f8d60f 100755 --- a/utils/rdautoback/rdautoback.py +++ b/utils/rdautoback/rdautoback.py @@ -50,10 +50,10 @@ syslog.syslog(syslog.LOG_INFO,'Starting Rivendell backup to "'+mountpoint+'"') # Mount backup device # result=os.system(command='findmnt '+mountpoint) -if(os.waitstatus_to_exitcode(result)!=0): +if(os.WEXITSTATUS(result)!=0): Path(mountpoint).mkdir(parents=True,exist_ok=True) result=os.system(command='mount '+mountpoint) - if(os.waitstatus_to_exitcode(result)!=0): + if(os.WEXITSTATUS(result)!=0): syslog.syslog(syslog.LOG_ERR,'unable to mount backup drive') exit(1) os.system(command='sleep 5') diff --git a/utils/rdautorest/rdautorest.py b/utils/rdautorest/rdautorest.py index 8acf8628..8206d79b 100755 --- a/utils/rdautorest/rdautorest.py +++ b/utils/rdautorest/rdautorest.py @@ -75,10 +75,10 @@ syslog.syslog(syslog.LOG_INFO,'Starting Rivendell restore from "'+mountpoint+'"' # Mount backup device # result=os.system(command='findmnt '+mountpoint) -if(os.waitstatus_to_exitcode(result)!=0): +if(os.WEXITSTATUS(result)!=0): Path(mountpoint).mkdir(parents=True,exist_ok=True) result=os.system(command='mount '+mountpoint) - if(os.waitstatus_to_exitcode(result)!=0): + if(os.WEXITSTATUS(result)!=0): syslog.syslog(syslog.LOG_ERR,'unable to mount backup drive') exit(1) os.system(command='sleep 5')