itman83 / sopcast-player

Automatically exported from code.google.com/p/sopcast-player
0 stars 0 forks source link

Fails if clipboard is empty #85

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Traceback (most recent call last):
  File "/usr/share/sopcast-player/lib/sopcast-player.py", line 452, in on_open_sop_address_activate
    if clipboard[0:6].lower() == "sop://":
TypeError: 'NoneType' object is not subscriptable
-----

This should solve the issue:

   clipboard = clipboard or ''
   if clipboard.lower().startswith('sop://'):
       // do stuff

Ubuntu 11.10 x86

Original issue reported on code.google.com by byashi...@gmail.com on 14 Feb 2012 at 4:32

GoogleCodeExporter commented 8 years ago
Added a test "if clipboard not None" as a suggestion by another user how 
reported a similar issue

Original comment by flyguy97 on 7 May 2012 at 12:07