[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1782] contrib/py/scripts/addons/ text_editor_pasteall.py: Fix for register/ unregister requirements + fix for socket module requires byte instead of string (py32 changes)

Dalai Felinto dfelinto at gmail.com
Mon Apr 4 20:27:19 CEST 2011


Revision: 1782
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1782
Author:   dfelinto
Date:     2011-04-04 18:27:19 +0000 (Mon, 04 Apr 2011)
Log Message:
-----------
Fix for register/unregister requirements + fix for socket module requires byte instead of string (py32 changes)

Modified Paths:
--------------
    contrib/py/scripts/addons/text_editor_pasteall.py

Modified: contrib/py/scripts/addons/text_editor_pasteall.py
===================================================================
--- contrib/py/scripts/addons/text_editor_pasteall.py	2011-04-04 16:01:52 UTC (rev 1781)
+++ contrib/py/scripts/addons/text_editor_pasteall.py	2011-04-04 18:27:19 UTC (rev 1782)
@@ -19,9 +19,9 @@
 bl_info = {
     "name": "PasteAll",
     "author": "Dalai Felinto (dfelinto)",
-    "version": (0,5),
-    "blender": (2, 5, 6),
-    "api": 34529,
+    "version": (0,6),
+    "blender": (2, 5, 7),
+    "api": 36007,
     "location": "Text editor > Properties panel",
     "description": "Send your selection or text to www.pasteall.org",
     "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"\
@@ -125,7 +125,7 @@
                     'code' : text }
 
         try:
-            data = urllib.parse.urlencode(values)
+            data = urllib.parse.urlencode(values).encode()
             req = urllib.request.Request(url, data)
             response = urllib.request.urlopen(req)
             page_source = response.read()
@@ -210,8 +210,11 @@
         description='Opens the page with the submitted text.',
         default=True)
 
+    bpy.utils.register_module(__name__)
+
 def unregister():
     del bpy.types.Scene.use_webbrowser
+    bpy.utils.unregister_module(__name__)
 
 if __name__ == "__main__":
     register()
\ No newline at end of file



More information about the Bf-extensions-cvs mailing list