remove no in case

This commit is contained in:
Muzahid 2021-02-06 19:12:33 +05:30
parent cdc2977331
commit 31c5e4ff38
Signed by untrusted user: cis-muzahid
GPG Key ID: 1DC85E7D3AB613EA

View File

@ -30,12 +30,12 @@ class UpgradeDB():
self.parameters = ""
# Switch methods with respect to versions
if not version in range(1, 11):
# return None when its getting wrong input
return None
if version in range(1, 11):
method_name = 'version_' + str(version)
method = getattr(self, method_name, lambda: "Invalid version")
return method()
# return None when its getting wrong input
return None
def version_1(self):
"""