Skip to content

Commit

Permalink
python2 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-cranfill committed Sep 28, 2017
1 parent a3f5a63 commit e8b7f4e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion cena/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
ENVIRONMENT = 'dev'
# ENVIRONMENT = 'nah dude'
DEV = ENVIRONMENT == 'dev'

YOLO_MODE = True
ANNOTATE_FRAME = False
# YOLO_MODE = False

ANNOTATE_FRAME = True
# ANNOTATE_FRAME = False

API_SERVER_NAME = 'face-api'

Expand Down
8 changes: 4 additions & 4 deletions cena/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def get_api_server_ip_address():
instance_ip = instance.public_ip_address
else:
instance_ip = instance.public_ip_address
print(f'instance already running at {instance_ip}')
print('instance already running at {}'.format(instance_ip))

# start_if_not_started(instance)
# instance_ip = instance.public_ip_address
Expand All @@ -62,14 +62,14 @@ def start_if_not_started(instance):
start_instance(instance)
else:
instance_ip = instance.public_ip_address
print(f'instance already running at {instance_ip}')
print('instance already running at {}'.format(instance_ip))


def start_instance(instance):
print(f'Starting instance {instance}...')
print('Starting instance {}...'.format(instance))
response = instance.start()
instance.wait_until_running()
print(f'Instance started at {instance.public_ip_address}')
print('Instance started at {}'.format(instance.public_ip_address))

#
# class EC2Manager(object):
Expand Down

0 comments on commit e8b7f4e

Please sign in to comment.