mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Cmp python3 compat (#25008)
* Use double-quotes for expect integration tests * Cast user input to string for expect integration tests * Remove usage of cmp() for python3 compatibility - Add code smell test to look for cmp usage - Fixes #24756
This commit is contained in:
@@ -402,7 +402,7 @@ class RollBack(object):
|
||||
self.module.fail_json(
|
||||
msg='Error: Commit label which should not start with a number.')
|
||||
if len(self.label.replace(' ', '')) == 1:
|
||||
if cmp(self.label, '-') == 0:
|
||||
if self.label == '-':
|
||||
self.module.fail_json(
|
||||
msg='Error: Commit label which should not be "-"')
|
||||
if len(self.label.replace(' ', '')) < 1 or len(self.label) > 256:
|
||||
|
||||
Reference in New Issue
Block a user