← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1831146] Re: PermissionError undefined on python 2.7

 

** Changed in: cloud-init
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1831146

Title:
  PermissionError undefined on python 2.7

Status in cloud-init:
  Fix Released

Bug description:
  running cloud-init-18.5-1.el7.x86_64 on RHEL 7.7

  as non-root user when I run `cloud-init status` I get the following
  error.

  Traceback (most recent call last):
    File "/usr/bin/cloud-init", line 9, in <module>
      load_entry_point('cloud-init==18.5', 'console_scripts', 'cloud-init')()
    File "/usr/lib/python2.7/site-packages/cloudinit/cmd/main.py", line 892, in main
      get_uptime=True, func=functor, args=(name, args))
    File "/usr/lib/python2.7/site-packages/cloudinit/util.py", line 2520, in log_time
      ret = func(*args, **kwargs)
    File "/usr/lib/python2.7/site-packages/cloudinit/cmd/status.py", line 53, in handle_status_args
      init.read_cfg()
    File "/usr/lib/python2.7/site-packages/cloudinit/stages.py", line 175, in read_cfg
      self._cfg = self._read_cfg(extra_fns)
    File "/usr/lib/python2.7/site-packages/cloudinit/stages.py", line 184, in _read_cfg
      return merger.cfg
    File "/usr/lib/python2.7/site-packages/cloudinit/helpers.py", line 278, in cfg
      self._cfg = self._read_cfg()
    File "/usr/lib/python2.7/site-packages/cloudinit/helpers.py", line 268, in _read_cfg
      cfgs.extend(self._get_instance_configs())
    File "/usr/lib/python2.7/site-packages/cloudinit/helpers.py", line 242, in _get_instance_configs
      except PermissionError:
  NameError: global name 'PermissionError' is not defined

  
  seems like it needs some workaround for python 2.7 similar to this one in some other project:
  https://github.com/rpm-software-management/mock/commit/46596dfd425a5bac58f51029fdd8c620623e4bb4

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1831146/+subscriptions



References