From ff5acea1a020a4c4f199dba13752d1473420bb1a Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 29 Jul 2022 13:42:48 -0500 Subject: [PATCH] Replace deprecated function call --- appy/shared/dav.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appy/shared/dav.py b/appy/shared/dav.py index 4d7949f..8f9b23f 100644 --- a/appy/shared/dav.py +++ b/appy/shared/dav.py @@ -3,7 +3,7 @@ import os, re, http.client, sys, stat, urllib.parse, time, socket, xml.sax from urllib.parse import quote from io import StringIO from mimetypes import guess_type -from base64 import encodestring +from base64 import encodebytes from appy import Object from appy.shared.utils import copyData, sequenceTypes from appy.shared.xml_parser import XmlUnmarshaller, XmlMarshaller @@ -161,7 +161,7 @@ class Resource: if 'Authorization' in headers: return credentials = '%s:%s' % (self.username, self.password) credentials = credentials.replace('\012', '') - headers['Authorization'] = "Basic %s" % encodestring(credentials) + headers['Authorization'] = "Basic %s" % encodebytes(credentials) headers['User-Agent'] = 'Appy' headers['Host'] = self.host headers['Connection'] = 'close'