I came across a problem with the recent version of python-jss which was breaking certain AutoPkg/JSSImporter runs:
JSSImporter: python-jss version: 2.0.1.
JSSImporter: JSSImporter version: 1.0.2b3.
global name 'urllib' is not defined
Failed.
I did a global search of the python-jss project and the only direct call to urllib is in distribution_point.py. Looking at that file, urllib.quote is being called but there is no import urllib statement, so that won't work (using python2).
So I made a minor change to this file, adding quote as a module, and changing urllib.quote to quote. This fixed the problem of running the recipes on a Mac using python2.
@mosen, could you verify that it is correct for python3? I made the assumption that quote is in urllib.parse since unquote is...but I have also learned never to assume anything :)
I came across a problem with the recent version of python-jss which was breaking certain AutoPkg/JSSImporter runs:
I did a global search of the
python-jss
project and the only direct call tourllib
is indistribution_point.py
. Looking at that file,urllib.quote
is being called but there is noimport urllib
statement, so that won't work (using python2).So I made a minor change to this file, adding
quote
as a module, and changingurllib.quote
toquote
. This fixed the problem of running the recipes on a Mac using python2.@mosen, could you verify that it is correct for python3? I made the assumption that
quote
is inurllib.parse
sinceunquote
is...but I have also learned never to assume anything :)