Commits

Anonymous committed 7dc73a0

fix return

Comments (0)

Files changed (1)

     if sys.platform == 'darwin':
         url = re.escape(url)
         os.system(r"echo %s | pbcopy" % url)
-        return 0
+        return True
         
     try:
         import win32clipboard
         win32clipboard.EmptyClipboard()
         win32clipboard.SetClipboardText(url)
         win32clipboard.CloseClipboard()
+        return True
     except ImportError:
         try:
             if os.environ.get('DISPLAY'):
                 gtk.clipboard_get(gtk.gdk.SELECTION_CLIPBOARD).set_text(url)
                 gobject.idle_add(gtk.main_quit)
                 gtk.main()
+                return True
         except:
             pass
-    return 1
+    return False
 @handle_errors
 def get_languages():
     c = httplib.HTTPConnection(FRIENDPASTE_SERVER)