Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Handle RE AttributeError for version calculation of package #247

Open
jyejare opened this issue Nov 13, 2018 · 1 comment
Open

Handle RE AttributeError for version calculation of package #247

jyejare opened this issue Nov 13, 2018 · 1 comment
Assignees

Comments

@jyejare
Copy link
Member

jyejare commented Nov 13, 2018

Upgrade fails with AttributeError: 'NoneType' object has no attribute 'group', if it unable to find the package and still trying to get its version.

Fix:

First check if the package exists and then attempt to calculate its version.

@jyejare jyejare self-assigned this Nov 13, 2018
@jyejare
Copy link
Member Author

jyejare commented Nov 13, 2018

Logs:

Traceback (most recent call last):
  File "/home/jenkins/shiningpanda/jobs/c664adfd/virtualenvs/d41d8cd9/lib/python2.7/site-packages/fabric/main.py", line 763, in main
    *args, **kwargs
  File "/home/jenkins/shiningpanda/jobs/c664adfd/virtualenvs/d41d8cd9/lib/python2.7/site-packages/fabric/tasks.py", line 427, in execute
    results['<local-only>'] = task.run(*args, **new_kwargs)
  File "/home/jenkins/shiningpanda/jobs/c664adfd/virtualenvs/d41d8cd9/lib/python2.7/site-packages/fabric/tasks.py", line 174, in run
    return self.wrapped(*args, **kwargs)
  File "/home/jenkins/workspace/upgrade-phase-6.5-rhel7/upgrade/runner.py", line 256, in product_upgrade
    'rhel7', puppet_clients7, puppet=True)
  File "/home/jenkins/workspace/upgrade-phase-6.5-rhel7/upgrade/client.py", line 204, in satellite6_client_upgrade
    host=docker_vm
  File "/home/jenkins/shiningpanda/jobs/c664adfd/virtualenvs/d41d8cd9/lib/python2.7/site-packages/fabric/tasks.py", line 387, in execute
    multiprocessing
  File "/home/jenkins/shiningpanda/jobs/c664adfd/virtualenvs/d41d8cd9/lib/python2.7/site-packages/fabric/tasks.py", line 277, in _execute
    return task.run(*args, **kwargs)
  File "/home/jenkins/shiningpanda/jobs/c664adfd/virtualenvs/d41d8cd9/lib/python2.7/site-packages/fabric/tasks.py", line 174, in run
    return self.wrapped(*args, **kwargs)
  File "/home/jenkins/workspace/upgrade-phase-6.5-rhel7/upgrade/client.py", line 263, in docker_clients_agent_version
    docker_execute_command(container, 'rpm -q {}'.format(agent)))
  File "/home/jenkins/workspace/upgrade-phase-6.5-rhel7/upgrade/helpers/tools.py", line 178, in version_filter
    return re.search(r'\d(\-\d|\.\d)*', rpm_name).group()
AttributeError: 'NoneType' object has no attribute 'group'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant