Skip to content

Commit

Permalink
refactor(Rafficer#367): use new fn with dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
marcel-engelke committed Mar 24, 2024
1 parent 5cfabb6 commit 92353fc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions protonvpn_cli/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,10 @@ def show_dialog(headline, choices, stop=False):
for country in sorted(countries.keys()):
country_features = []
for server in countries[country]:
feat = int(get_server_value(server, "Features", servers))
for bit_flag in features:
if (feat & bit_flag) != 0:
if not features[bit_flag] in country_features:
country_features.append(features[bit_flag])
server_features = get_server_features(server, servers)
for feat in server_features:
if not feat in country_features:
country_features.append(feat)

if len(country_features) == 0:
country_features.append("Normal")
Expand Down

0 comments on commit 92353fc

Please sign in to comment.