mirror of
https://github.com/ansible/awx.git
synced 2026-03-27 05:45:02 -02:30
Merge pull request #3020 from beeankha/fix_unicode_error
Fix unicode error
Reviewed-by: Ryan Petrello
https://github.com/ryanpetrello
This commit is contained in:
@@ -104,7 +104,7 @@ class Command(BaseCommand):
|
|||||||
changed3 = False
|
changed3 = False
|
||||||
(ig, created, changed1) = self.get_create_update_instance_group(queuename, inst_per, inst_min)
|
(ig, created, changed1) = self.get_create_update_instance_group(queuename, inst_per, inst_min)
|
||||||
if created:
|
if created:
|
||||||
print(six.text_type("Creating instance group {}".format(ig.name)))
|
print(six.text_type("Creating instance group {}").format(ig.name))
|
||||||
elif not created:
|
elif not created:
|
||||||
print(six.text_type("Instance Group already registered {}").format(ig.name))
|
print(six.text_type("Instance Group already registered {}").format(ig.name))
|
||||||
|
|
||||||
@@ -126,4 +126,3 @@ class Command(BaseCommand):
|
|||||||
if instance_not_found_err:
|
if instance_not_found_err:
|
||||||
print(instance_not_found_err.message)
|
print(instance_not_found_err.message)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|||||||
@@ -152,10 +152,6 @@ class Instance(HasPolicyEditsMixin, BaseModel):
|
|||||||
self.save(update_fields=['capacity', 'version', 'modified', 'cpu',
|
self.save(update_fields=['capacity', 'version', 'modified', 'cpu',
|
||||||
'memory', 'cpu_capacity', 'mem_capacity'])
|
'memory', 'cpu_capacity', 'mem_capacity'])
|
||||||
|
|
||||||
def clean_hostname(self):
|
|
||||||
return self.hostname
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class InstanceGroup(HasPolicyEditsMixin, BaseModel, RelatedJobsMixin):
|
class InstanceGroup(HasPolicyEditsMixin, BaseModel, RelatedJobsMixin):
|
||||||
"""A model representing a Queue/Group of AWX Instances."""
|
"""A model representing a Queue/Group of AWX Instances."""
|
||||||
@@ -222,8 +218,6 @@ class InstanceGroup(HasPolicyEditsMixin, BaseModel, RelatedJobsMixin):
|
|||||||
class Meta:
|
class Meta:
|
||||||
app_label = 'main'
|
app_label = 'main'
|
||||||
|
|
||||||
def clean_name(self):
|
|
||||||
return self.name
|
|
||||||
|
|
||||||
def fit_task_to_most_remaining_capacity_instance(self, task):
|
def fit_task_to_most_remaining_capacity_instance(self, task):
|
||||||
instance_most_capacity = None
|
instance_most_capacity = None
|
||||||
|
|||||||
Reference in New Issue
Block a user