Loader: remove unneeded `self._smb_initialized` variable

This commit is contained in:
Qua-non 2012-08-17 02:34:32 +05:30
parent 3f1aa3f0fb
commit 8a6a200b33
1 changed files with 2 additions and 3 deletions

View File

@ -150,14 +150,13 @@ class LoaderBase(object):
proto = filename.split(':', 1)[0] proto = filename.split(':', 1)[0]
if proto == 'smb': if proto == 'smb':
try: try:
# note: it's important to load SMBHandler for every time # note: it's important to load SMBHandler every time
# otherwise the data is occasionaly not loaded # otherwise the data is occasionaly not loaded
from smb.SMBHandler import SMBHandler from smb.SMBHandler import SMBHandler
except ImportError: except ImportError:
Logger.warning( Logger.warning(
'Loader: can not load PySMB: make sure it is installed') 'Loader: can not load PySMB: make sure it is installed')
return return
self._smb_initialized = True
import tempfile import tempfile
data = None data = None
try: try:
@ -167,7 +166,7 @@ class LoaderBase(object):
prefix='kivyloader', suffix=suffix) prefix='kivyloader', suffix=suffix)
if proto == 'smb': if proto == 'smb':
# read from network # read from samba shares
fd = urllib2.build_opener(SMBHandler).open(filename) fd = urllib2.build_opener(SMBHandler).open(filename)
else: else:
# read from internet # read from internet