diff cagou/plugins/plugin_transfer_android_gallery.py @ 312:772c170b47a9

Python3 port: /!\ Cagou now runs with Python 3.6+ Port has been done in the same way as for backend (check backend commit b2d067339de3 message for details).
author Goffi <goffi@goffi.org>
date Tue, 13 Aug 2019 19:14:22 +0200
parents 1b835bcfa663
children 4d660b252487
line wrap: on
line diff
--- a/cagou/plugins/plugin_transfer_android_gallery.py	Mon Aug 05 11:21:54 2019 +0200
+++ b/cagou/plugins/plugin_transfer_android_gallery.py	Tue Aug 13 19:14:22 2019 +0200
@@ -37,12 +37,12 @@
 
 
 PLUGIN_INFO = {
-    "name": _(u"gallery"),
+    "name": _("gallery"),
     "main": "AndroidGallery",
     "platforms": ('android',),
     "external": True,
-    "description": _(u"upload a photo from photo gallery"),
-    "icon_medium": u"{media}/icons/muchoslava/png/gallery_50.png",
+    "description": _("upload a photo from photo gallery"),
+    "icon_medium": "{media}/icons/muchoslava/png/gallery_50.png",
 }
 
 
@@ -61,7 +61,7 @@
         # TODO: move file dump to a thread or use async callbacks during file writting
         if requestCode == PHOTO_GALLERY and resultCode == RESULT_OK:
             if data is None:
-                log.warning(u"No data found in activity result")
+                log.warning("No data found in activity result")
                 self.cancel_cb(self, None)
                 return
             uri = data.getData()
@@ -80,7 +80,7 @@
             def cleaning():
                 os.unlink(tmp_file)
                 os.rmdir(tmp_dir)
-                log.debug(u'temporary file cleaned')
+                log.debug('temporary file cleaned')
             buff = bytearray(4096)
             with open(tmp_file, 'wb') as f:
                 while True: