MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / _remove_path_if_exists

Function _remove_path_if_exists

Scripts/Settings.py:839–847  ·  view source on GitHub ↗

Removes a file/directory/symlink if it exists.

(target_path)

Source from the content-addressed store, hash-verified

837 stdscr.addstr(y, x, safe_text)
838 except Exception:
839 pass
840
841
842def safe_curses_wrapper(func, *args, **kwargs):
843 """Run a curses UI while tolerating Termux cleanup-only errors.
844
845 Startup deliberately matches :func:`curses.wrapper`: ``noecho()``,
846 ``cbreak()`` and keypad mode must all succeed before the UI starts. Hiding
847 failures there leaves the terminal in canonical/echo mode, causing arrow
848 keys to appear as escape text such as ``^[OB`` and requiring Enter.
849
850 Some Termux/Python 3.14 combinations raise ``curses.error`` only while

Calls

no outgoing calls

Tested by

no test coverage detected