Skip to content

Commit 709c18a

Browse files
author
Dan Choi
committed
change print to log
1 parent 5af37dc commit 709c18a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sagemaker/local/image.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -659,11 +659,11 @@ def _write_json_file(filename, content):
659659
def _ecr_login_if_needed(boto_session, image):
660660
# Only ECR images need login
661661
if not ('dkr.ecr' in image and 'amazonaws.com' in image):
662-
return False
662+
return
663663

664664
# do we have the image?
665665
if _check_output('docker images -q %s' % image).strip():
666-
return False
666+
return
667667

668668
if not boto_session:
669669
raise RuntimeError('A boto session is required to login to ECR.'
@@ -685,7 +685,7 @@ def _ecr_login_if_needed(boto_session, image):
685685

686686
def _pull_image(image):
687687
pull_image_command = ('docker pull %s' % image).strip()
688-
print('docker command: {}'.format(pull_image_command))
688+
logger.info('docker command: {}'.format(pull_image_command))
689689

690690
subprocess.check_output(pull_image_command, shell=True)
691-
print('image pulled: {}'.format(image))
691+
logger.info('image pulled: {}'.format(image))

0 commit comments

Comments
 (0)