Commits

Anonymous committed 7693e11

typo

  • Participants
  • Parent commits d31af88

Comments (0)

Files changed (1)

File contrib/friendpastepy/friendpastepy.py

 class ClipboardNotAvailable(Exception):
     """ Exception when you can't get or set content in the clipboard """    
     
-    
-    
 class FriendpastePy(object):
     """ Interface to manage paste to friendpaste server.
     
         """
         return self._make_request("GET", "/%s" % pasteid)
         
-    def get_id_fro_url(self, url):
+    def get_id_from_url(self, url):
         """ Extract id from a valid friendpaste url.
         
         >>> friendpaste = FriendpastePy()
         :param url: full url of paste
         :return: response
         """
-        pasteid = self.get_id_fro_url(url)
+        pasteid = self.get_id_from_url(url)
         return self.get(pasteid) 
         
     def update(self, pasteid, title, snippet, lang=None):
         :param lang: optionnal, the lang of the paste
         :return: response dict
         """
-        pasteid = self.get_id_fro_url(url)
+        pasteid = self.get_id_from_url(url)
         return self.update(pasteid, title, snippet, lang)
         
     def changeset(self, pasteid, rev):
             value = value.encode('utf-8')
         params.append((name, value))
     return urlencode(params)
-        
-
-def test_suite():
-    import doctest
-    doctest.testmod()
     
 def read_clipboard(): 
     data = None   
     fd.close
     return url
     
-
-def utf8(text):
-    if isinstance(text, unicode):
-        return text.encode('utf-8')
-    elif isinstance(text, str):
-        return text
-    else:
-        return str(text)
-
 if __name__ == "__main__":
     # parse command line
     from optparse import OptionParser