Sandro Bonazzola has posted comments on this change.

Change subject: packaging: setup: handling previously generated answerfile with 
wrong types
......................................................................


Patch Set 2:

(2 comments)

https://gerrit.ovirt.org/#/c/38417/2/src/plugins/ovirt-hosted-engine-setup/vm/cpu.py
File src/plugins/ovirt-hosted-engine-setup/vm/cpu.py:

Line 56:         # fixing values from answerfiles badly generated prior than 3.6
Line 57:         if type(self.environment[ohostedcons.VMEnv.VCPUS]) == int:
Line 58:             self.environment[
Line 59:                 ohostedcons.VMEnv.VCPUS
Line 60:             ] = str(self.environment[ohostedcons.VMEnv.VCPUS])
you can safely drop the if part
 >>> a = '1'
 >>> str(a)
 '1'
 >>>
Line 61: 
Line 62:     @plugin.event(
Line 63:         stage=plugin.Stages.STAGE_CUSTOMIZATION,
Line 64:         after=(


https://gerrit.ovirt.org/#/c/38417/2/src/plugins/ovirt-hosted-engine-setup/vm/memory.py
File src/plugins/ovirt-hosted-engine-setup/vm/memory.py:

Line 56:         # fixing values from answerfiles badly generated prior than 3.6
Line 57:         if type(self.environment[ohostedcons.VMEnv.MEM_SIZE_MB]) == 
int:
Line 58:             self.environment[
Line 59:                 ohostedcons.VMEnv.MEM_SIZE_MB
Line 60:             ] = str(self.environment[ohostedcons.VMEnv.MEM_SIZE_MB])
same here
Line 61: 
Line 62:     @plugin.event(
Line 63:         stage=plugin.Stages.STAGE_CUSTOMIZATION,
Line 64:         condition=lambda self: not self.environment[


-- 
To view, visit https://gerrit.ovirt.org/38417
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I07c296c4ef92430f03a5b23a2a996db9c643a9c5
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-hosted-engine-setup
Gerrit-Branch: master
Gerrit-Owner: Simone Tiraboschi <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: Simone Tiraboschi <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to