diff --git a/etcd.py b/etcd.py index 1b53497..41111d9 100755 --- a/etcd.py +++ b/etcd.py @@ -270,14 +270,12 @@ def etcd_arguments(self, data_dir, initial_cluster, cluster_state): etcdversion = os.environ.get('ETCDVERSION') if etcdversion: etcdversion = list(map(lambda x: int(x), etcdversion.split('.'))) - # don't try to add additonal flags if we encounter an unexpected version format - if len(etcdversion) == 3: - # etcd >= v3.3: serve metrics on an additonal port - if etcdversion[0] >= 3 and etcdversion[1] >= 3: - arguments += [ - '-listen-metrics-urls', - 'http://0.0.0.0:{}'.format(self.metrics_port), - ] + # etcd >= v3.3: serve metrics on an additonal port + if etcdversion >= [3, 3]: + arguments += [ + '-listen-metrics-urls', + 'http://0.0.0.0:{}'.format(self.metrics_port), + ] # return final list of arguments return arguments