+ if ':' in args.image:
+ if args.tag is not None:
+ logger.error(
+ "image %r already includes a tag, cannot add tag argument %r",
+ args.image, args.tag)
+ sys.exit(1)
+ args.image, args.tag = args.image.split(':', 1)
+ elif args.tag is None:
+ args.tag = 'latest'
+