redhat_subscription: Fix usage of ConfigParser (#54815)

(cherry picked from commit 09f68fc659)
pull/55422/head
Christopher Snyder 7 years ago committed by Toshio Kuratomi
parent 8d259f6e64
commit ad953171eb

@ -0,0 +1,2 @@
bugfixes:
- redhat_subscription - For compatibility using the redhat_subscription module on hosts set to use a python 3 interpreter, use string values when updating yum plugin configuration files.

@ -249,9 +249,9 @@ class RegistrationBase(object):
cfg.read([tmpfile])
if enabled:
cfg.set('main', 'enabled', 1)
cfg.set('main', 'enabled', '1')
else:
cfg.set('main', 'enabled', 0)
cfg.set('main', 'enabled', '0')
fd = open(tmpfile, 'w+')
cfg.write(fd)

Loading…
Cancel
Save