Skip to content

Commit

Permalink
codeql: more fixes
Browse files Browse the repository at this point in the history
Signed-off-by: matthias.gatto <[email protected]>
  • Loading branch information
outscale-mgo committed Sep 26, 2023
1 parent cee8bd2 commit b443424
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion osc_tui/createLoadbalancer.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def back():
def create():
name = NAME.get_value()
protocol = PROTOCOL.get_values()[PROTOCOL.get_value()]
res = main.GATEWAY.CreateLoadBalancer(
main.GATEWAY.CreateLoadBalancer(
form=self,
SubregionNames=[SUBREGION.get_values()[SUBREGION.get_value()]],
Listeners=[{
Expand Down
1 change: 0 additions & 1 deletion osc_tui/createVpcs.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import oscscreen
from osc_tui import main
from osc_tui import popup
import os
from osc_tui import preloader

# CIDR input for vpcs
Expand Down
2 changes: 1 addition & 1 deletion osc_tui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

def readVms():
reply = GATEWAY.ReadVms()
if reply == None:
if reply is None:
return None
return reply["Vms"]

Expand Down
5 changes: 2 additions & 3 deletions osc_tui/popup.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ def delete_cb():

def editSnapshot(form, snapshot, form_color='STANDOUT'):
id = snapshot[0]
description = snapshot[1]
# description = snapshot[1]
size = snapshot[2]
volume_id = snapshot[3]

Expand Down Expand Up @@ -798,7 +798,6 @@ def notify(message, title="Loading", form_color='STANDOUT',
F = PendingPopup(name=title, color=form_color)
F.preserve_selected_widget = True
mlw = F.add(wgmultiline.Pager,)
mlw_width = mlw.width - 1
message = message.split('\n')
mlw.values = message
F.display()
Expand Down Expand Up @@ -854,7 +853,7 @@ def capsule():

def editKeypair(form, line, form_color='STANDOUT'):
name = line[0]
fingerprint = line[1]
#fingerprint = line[1]

F = displayPopup(name="Keypair: {}".format(name))
F.preserve_selected_widget = True
Expand Down
2 changes: 1 addition & 1 deletion osc_tui/selectableGrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def h_refresh(self, inpt, name_filter=None, skip_call=False):
if skip_call == False:
tries = 0
data = self.refresh_call(name_filter=name_filter)
while data == None and tries < 10:
while data is None and tries < 10:
time.sleep(0.5)
data = self.refresh_call(name_filter=name_filter)
tries += 1
Expand Down

0 comments on commit b443424

Please sign in to comment.