python-jenkins/jenkins
Evgeni Golov b147d86446 only change view name from all to All when All was requested
Otherwise you get errors like:

    Traceback (most recent call last):
      File "path/bin/jenkins-jobs", line 8, in <module>
        sys.exit(main())
                 ^^^^^^
      File "path/lib64/python3.12/site-packages/jenkins_jobs/cli/entry.py", line 179, in main
        jjb.execute()
      File "path/lib64/python3.12/site-packages/jenkins_jobs/cli/entry.py", line 158, in execute
        ext.obj.execute(self.options, self.jjb_config)
      File "path/lib64/python3.12/site-packages/jenkins_jobs/cli/subcommand/update.py", line 154, in execute
        n = builder.delete_old_managed_views(keep=keep_views)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "path/lib64/python3.12/site-packages/jenkins_jobs/builder.py", line 402, in delete_old_managed_views
        if view["name"] not in keep and self.is_view(view["name"], use_cache=False):
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "path/lib64/python3.12/site-packages/jenkins_jobs/builder.py", line 384, in is_view
        return self.jenkins.view_exists(view_name)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "path/lib64/python3.12/site-packages/jenkins/__init__.py", line 1857, in view_exists
        if self.get_view_name(name) == name:
           ^^^^^^^^^^^^^^^^^^^^^^^^
      File "path/lib64/python3.12/site-packages/jenkins/__init__.py", line 1834, in get_view_name
        raise JenkinsException(
    jenkins.JenkinsException: Jenkins returned an unexpected view name All (expected: all)

Fixes: a8f0d8cfda
Change-Id: I82b5abd8429190e871e432732d502b0640ebc99b
Signed-off-by: Evgeni Golov <evgeni@golov.de>
2024-05-10 13:18:59 +02:00
..
__init__.py only change view name from all to All when All was requested 2024-05-10 13:18:59 +02:00
plugins.py Fix compatibility with setuptools >= 66 2023-10-19 15:42:27 +00:00
version.py Setup pbr versioning for docs 2014-09-26 09:12:54 -07:00