Skip to content

Commit

Permalink
Remove "pipes" Python module dependency (#4336)
Browse files Browse the repository at this point in the history
This commit fixes the folowing warning at boot:

<118>/usr/local/opnsense/scripts/OPNsense/Tinc/tincd.py:34: DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13
  • Loading branch information
andrewhotlab authored Nov 3, 2024
1 parent 30bf1fa commit 343912e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions security/tinc/src/opnsense/scripts/OPNsense/Tinc/tincd.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
import os
import sys
import glob
import pipes
import xml.etree.ElementTree
import shutil
import subprocess
import ipaddress
from lib import objects
from shlex import quote

def write_file(filename, content, mode=0o600):
dirname = '/'.join(filename.split('/')[0:-1])
Expand Down Expand Up @@ -92,7 +92,7 @@ def deploy(config_filename):

if_up = list()
if_up.append("#!/bin/sh")
if_up.append("ifconfig %s %s %s" % (interface_name, interface_family, pipes.quote(interface_address)))
if_up.append("ifconfig %s %s %s" % (interface_name, interface_family, quote(interface_address)))
if_up.append("configctl interface %s %s" % (interface_configd, interface_name))
write_file("%s/tinc-up" % network.get_basepath(), '\n'.join(if_up) + "\n", 0o700)

Expand Down

0 comments on commit 343912e

Please sign in to comment.