Smb support for Loader using PySMB #642

Merged
merged 3 commits into from Aug 17, 2012

Projects

None yet

3 participants

@akshayaurora
Member

No description provided.

@tshirtman tshirtman and 1 other commented on an outdated diff Aug 16, 2012
kivy/loader.py
@@ -155,8 +166,12 @@ def _load_urllib(self, filename):
_out_osfd, _out_filename = tempfile.mkstemp(
prefix='kivyloader', suffix=suffix)
- # read from internet
- fd = urllib2.urlopen(filename)
+ if proto == 'smb':
+ # read from network
+ fd = urllib2.build_opener(SMBHandler).open(filename)
+ else:
+ # read from internet
+ fd = urllib2.urlopen(filename)
@tshirtman
tshirtman Aug 16, 2012 Member

Only nitpicking here, internet is a network, and nothing technically forbid using smb accross the internet (i did, once), even if it's not really sane from a security POV ^^. So comments are not really informative :)

@akshayaurora
akshayaurora Aug 16, 2012 Member

good point :)

@tshirtman
Member

Seems correct, maybe pysmb could be put in the dependencies ? or maybe we could have a section for suggested dependencies for optional features ?

@akshayaurora
Member

+1 for the latter. Although we already have optional dependencies for optional features(twisted, urllib/2, and now pyjnius ). They aren't mentioned in a consolidated format at one place.

@tito tito merged commit f762130 into master Aug 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment