GPG File Integrity Failed

I had a system dead in the water because the sysadmin_update_system script ran into some kind of issue while upgrading to v12. The error message when trying to upgrade or download any module said “File Integrity failed…”. I commented out these lines around line 962 of nano /var/www/html/admin/libraries/module.functions.php which seemed to let me upgrade manually:

        // Check the MD5 info against what's in the module's XML
//      if (!isset($res['md5sum']) || empty($res['md5sum'])) {
                //echo "<div class=\"error\">"._("Unable to Locate Integrity information for")." {$filename} - "._("Continuing Anyw$
//      } else if ($res['md5sum'] != md5 ($filedata)) {
//              unlink($filename);
//              return array(sprintf(_('File Integrity failed for %s - aborting'), $filename));
//      }