Fix some deprecation warnings and imports
This commit is contained in:
parent
7abd8efd81
commit
52e39d4fe9
@ -24,7 +24,10 @@
|
|||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from sha import sha
|
try:
|
||||||
|
from hashlib import sha1 as sha
|
||||||
|
except ImportError:
|
||||||
|
from sha import sha
|
||||||
import urlparse
|
import urlparse
|
||||||
|
|
||||||
from deluge import bencode
|
from deluge import bencode
|
||||||
|
|||||||
@ -241,7 +241,7 @@ class FilterTreeView(component.Component):
|
|||||||
try: #assume we could get trashed images here..
|
try: #assume we could get trashed images here..
|
||||||
pix = gtk.gdk.pixbuf_new_from_file_at_size(filename, 16, 16)
|
pix = gtk.gdk.pixbuf_new_from_file_at_size(filename, 16, 16)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
log.debug(e.message)
|
log.debug(e)
|
||||||
|
|
||||||
if not pix:
|
if not pix:
|
||||||
pix = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, True, 8, 16, 16)
|
pix = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, True, 8, 16, 16)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user