Skip to content

Commit

Permalink
try fixing mypy 2
Browse files Browse the repository at this point in the history
  • Loading branch information
pfandzelter committed Mar 26, 2024
1 parent 1194d3e commit 77f3f0c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions pkg/ebpfem/ebpfem_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func TestBasic(t *testing.T) {

if _, err := cmd.CombinedOutput(); err != nil {
// ignore
log.Debugf("could not delete tap %s: %s", tap, err)
}

// iptables -D FORWARD -i [TAP_NAME] -o [HOSTINTERFACE] -j ACCEPT
Expand All @@ -73,6 +74,7 @@ func TestBasic(t *testing.T) {

if _, err := cmd.CombinedOutput(); err != nil {
// ignore
log.Debugf("could not delete iptables rule: %s", err)
}

// create a tap device
Expand Down
4 changes: 4 additions & 0 deletions pkg/peer/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ func (p *PeeringService) InitPeering(remotes map[orchestrator.Host]HostInfo) err

portNum, err := strconv.ParseUint(port, 10, 16)

if err != nil {
return errors.WithStack(err)
}

r := &peer{
directAddr: net.ParseIP(addr),
wgAddr: remoteWgAddr,
Expand Down
2 changes: 1 addition & 1 deletion pkg/virt/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (m *machine) initialize() error {
return errors.WithStack(err)
}

loglevel := "ERROR"
var loglevel string

// unfortunately Firecracker is incredibly verbose
switch log.GetLevel() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/virt/net.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func removeNetworkDevice(tapName string, hostInterface string) error {
}

// createNetworkDevice creates a new network device for a microVM.
func createNetworkDevice(gateway net.IPNet, tapName string, hostInterface string) error {
func createNetworkDevice(gateway net.IPNet, tapName string, _ string) error {

// ip tuntap add [TAP_NAME] mode tap

Expand Down

0 comments on commit 77f3f0c

Please sign in to comment.