]> jfr.im git - z_archive/twitter.git/blobdiff - twitter/cmdline.py
Merge branch 'master' into py3-2
[z_archive/twitter.git] / twitter / cmdline.py
index 54a994e2ea2df5815ccd4b626ccc3ec4280c0feb..fdf01fc4c0a558d47d90eef654a0ea360e42e379 100644 (file)
@@ -371,7 +371,7 @@ class SearchAction(Action):
         # We need to bypass the TwitterCall parameter encoding, so we
         # don't encode the plus sign, so we have to encode it ourselves
         query_string = "+".join(
-            [quote(term.decode(get_term_encoding()))
+            [quote(term)
              for term in options['extra_args']])
 
         results = twitter.search(q=query_string)['results']
@@ -448,11 +448,10 @@ class LeaveAction(AdminAction):
 
 class SetStatusAction(Action):
     def __call__(self, twitter, options):
-        statusTxt = (" ".join(options['extra_args']).decode(get_term_encoding())
+        statusTxt = (" ".join(options['extra_args'])
                      if options['extra_args']
                      else str(input("message: ")))
-        status = (statusTxt.encode('utf8', 'replace'))
-        twitter.statuses.update(status=status)
+        twitter.statuses.update(status=statusTxt)
 
 class TwitterShell(Action):