diff --git a/comrad/app/screens/profile/profile.py b/comrad/app/screens/profile/profile.py index e5448b2..7576378 100644 --- a/comrad/app/screens/profile/profile.py +++ b/comrad/app/screens/profile/profile.py @@ -248,8 +248,11 @@ class ProfileScreen(ProtectedScreen): # raise Exception(f'Got filename! {fnfn}') if not os.path.exists(fnfn): return ext=os.path.splitext(fnfn)[1] - ofnfn=os.path.join(PATH_AVATARS,self.app.username+ext) - shutil.copyfile(fnfn,ofnfn) + ofnfn=os.path.join(PATH_AVATARS,self.app.username+'.png') + # shutil.copyfile(fnfn,ofnfn) + from PIL import Image as pImage + im = pImage.open(fnfn) + im.save(ofnfn) # re-get circular image # self.avatar_layout.remove_widget(self.avatar) diff --git a/comrad/backend/crypt.py b/comrad/backend/crypt.py index 036597c..0b7bd29 100644 --- a/comrad/backend/crypt.py +++ b/comrad/backend/crypt.py @@ -142,10 +142,10 @@ class Crypt(Logger): k_b=self.package_key(k,prefix=prefix) k_b_hash = self.hash(k_b) - with self.db.transaction(): - del self.db[k_b_hash] + v = self.db.command('get',k_b_hash) + self.log('<--',v) - return True + return v def get(self,k,prefix=''):