backup: simplify test expressions to make pylint happy

This commit is contained in:
Marek Marczykowski-Górecki 2018-12-03 23:27:10 +01:00
parent 377c80d33d
commit 28067f70ac
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -195,8 +195,7 @@ class Core2Qubes(qubesadmin.backup.BackupApp):
if element.get("uses_default_netvm") is None:
uses_default_netvm = True
else:
uses_default_netvm = (
True if element.get("uses_default_netvm") == "True" else False)
uses_default_netvm = (element.get("uses_default_netvm") == "True")
if not uses_default_netvm:
netvm_qid = element.get("netvm_qid")
if netvm_qid is None or netvm_qid == "none":
@ -209,8 +208,7 @@ class Core2Qubes(qubesadmin.backup.BackupApp):
uses_default_dispvm_netvm = True
else:
uses_default_dispvm_netvm = (
True if element.get("uses_default_dispvm_netvm") == "True"
else False)
element.get("uses_default_dispvm_netvm") == "True")
if not uses_default_dispvm_netvm:
dispvm_netvm_qid = element.get("dispvm_netvm_qid")
if dispvm_netvm_qid is None or dispvm_netvm_qid == "none":