1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-03-21 18:50:38 +03:00

util.kerberos: Update for old Python3 compatibility

This commit is contained in:
Игорь Чудов 2020-06-25 14:39:01 +04:00
parent 6f5db26688
commit 9bc426fa0c
Signed by untrusted user: nir
GPG Key ID: 0F3883600CAE7AAC

View File

@ -16,6 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
from pathlib import Path
import logging
import subprocess
@ -40,7 +41,9 @@ def machine_kdestroy(cache_name):
host = get_machine_name()
subprocess.call(['kdestroy', '-c', cache_name])
cache_file = Path(cache_name)
cache_file.unlink()
if os.path.exists(cache_name):
cache_file.unlink()
def check_krb_ticket():