settings = yaml.safe_load(f)
for setting in ["nexus", "user", "password"]:
- if not setting in settings:
+ if setting not in settings:
log.error("{} needs to be defined".format(setting))
sys.exit(1)
settings = yaml.safe_load(f)
for setting in ["email_domain", "base_groupId", "repositories"]:
- if not setting in config:
+ if setting not in config:
log.error("{} needs to be defined in {}".format(setting, config_file))
sys.exit(1)
if settings_file:
for setting in ["nexus", "user", "password"]:
- if not setting in settings:
+ if setting not in settings:
log.error("{} needs to be defined in {}".format(setting, settings_file))
sys.exit(1)
groupId = "{}.{}".format(base_groupId, repo)
target = util.create_repo_target_regex(groupId, strict)
- if not global_privs and not "extra_privs" in config:
+ if not global_privs and "extra_privs" not in config:
extra_privs = []
elif global_privs:
extra_privs = global_privs
def mocked_docker_pull(self, nexus_image_str, count, tag, retry_text="", progbar=False):
"""Mocking Pull an image from Nexus."""
- if not nexus_image_str in self._expected_nexus_image_str:
+ if nexus_image_str not in self._expected_nexus_image_str:
raise ValueError("Wrong nexus project in pull")
image = self.mock_image(self._test_image_long_id, self._test_image_short_id)
self.counter.pull = self.counter.pull + 1
"""Mocking Tag the image with proper docker name and version."""
if not image.id == self._test_image_long_id:
raise ValueError("Wrong image id in remove")
- if not tag in ["1.4.0", "1.4.1"]:
+ if tag not in ["1.4.0", "1.4.1"]:
raise ValueError("Wrong tag in docker_tag")
self.counter.tag = self.counter.tag + 1
if self.counter.tag <= self.nbr_exc.tag:
"""Mocking Tag the image with proper docker name and version."""
if not image.id == self._test_image_long_id:
raise ValueError("Wrong image id in remove")
- if not tag in ["1.4.0", "1.4.1"]:
+ if tag not in ["1.4.0", "1.4.1"]:
raise ValueError("Wrong tag in push")
self.counter.push = self.counter.push + 1
if self.counter.push <= self.nbr_exc.push:
def mocked_docker_pull(self, nexus_image_str, count, tag, retry_text="", progbar=False):
"""Mocking Pull an image from Nexus."""
- if not nexus_image_str in self._expected_nexus_image_str:
+ if nexus_image_str not in self._expected_nexus_image_str:
print("IMAGESTR {}".format(nexus_image_str))
raise ValueError("Wrong nexus project in pull")
image = self.mock_image(self._test_image_long_id, self._test_image_short_id)
"""Mocking Tag the image with proper docker name and version."""
if not image.id == self._test_image_long_id:
raise ValueError("Wrong image id in remove")
- if not tag in ["1.4.0", "1.3.1", "1.3.2"]:
+ if tag not in ["1.4.0", "1.3.1", "1.3.2"]:
raise ValueError("Wrong tag in docker_tag")
self.counter.tag = self.counter.tag + 1
if self.counter.tag <= self.nbr_exc.tag:
"""Mocking Tag the image with proper docker name and version."""
if not image.id == self._test_image_long_id:
raise ValueError("Wrong image id in remove")
- if not tag in ["1.4.0", "1.3.1", "1.3.2"]:
+ if tag not in ["1.4.0", "1.3.1", "1.3.2"]:
raise ValueError("Wrong tag in push")
self.counter.push = self.counter.push + 1
if self.counter.push <= self.nbr_exc.push: