Rename munkilib/distutils.py to munkilib/appledistutils.py so as to not conflict with stdlib distutils

This commit is contained in:
Greg Neagle
2017-01-04 09:37:45 -08:00
parent 3acba9bcdc
commit 087bfa7d5f
2 changed files with 14 additions and 12 deletions

View File

@@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""
distutils.py
appledistutils.py
Created by Greg Neagle on 2017-01-04.

View File

@@ -30,15 +30,6 @@ import time
import urllib2
import urlparse
import FoundationPlist
import catalogs
import distutils
import fetch
import launchd
import munkicommon
import munkistatus
import updatecheck
# PyLint cannot properly find names inside Cocoa libraries, so issues bogus
# No name 'Foo' in module 'Bar' warnings. Disable them.
# pylint: disable=E0611
@@ -55,6 +46,16 @@ from CoreFoundation import kCFPreferencesAnyUser
from CoreFoundation import kCFPreferencesCurrentHost
# pylint: enable=E0611
from . import catalogs
from . import appledistutils
from . import fetch
from . import launchd
from . import munkicommon
from . import munkistatus
from . import updatecheck
from . import FoundationPlist
# Disable PyLint complaining about 'invalid' camelCase names
# pylint: disable=C0103
@@ -872,8 +873,9 @@ class AppleUpdates(object):
english_dist = self.GetDistributionForProductKey(
product_key, sucatalog, 'English')
if english_dist:
english_su_info = distutils.parse_su_dist(english_dist)
su_info = distutils.parse_su_dist(localized_dist)
english_su_info = appledistutils.parse_su_dist(
english_dist)
su_info = appledistutils.parse_su_dist(localized_dist)
su_info['productKey'] = product_key
if su_info['name'] == '':
su_info['name'] = product_key