Skip to content

Commit 38ab7de

Browse files
authored
Minor QoL fixes (#4750)
* Fix warning * IPython: disable tip in -H mode
1 parent b564a13 commit 38ab7de

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

scapy/layers/smbserver.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from scapy.arch import get_if_addr
2727
from scapy.automaton import ATMT, Automaton
2828
from scapy.config import conf
29+
from scapy.consts import WINDOWS
2930
from scapy.error import log_runtime, log_interactive
3031
from scapy.volatile import RandUUID
3132

@@ -1058,7 +1059,7 @@ def lookup_file(self, fname, durable_handle=None, create=False, createOptions=No
10581059
# Note: symbolic links are currently unsupported.
10591060
if root not in path.parents and path != root:
10601061
raise FileNotFoundError
1061-
if path.is_reserved():
1062+
if WINDOWS and path.is_reserved():
10621063
raise FileNotFoundError
10631064
if not path.exists():
10641065
if create and createOptions:

scapy/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -985,6 +985,8 @@ def ptpython_configure(repl):
985985
cfg.InteractiveShellEmbed.term_title = False
986986
cfg.HistoryAccessor.hist_file = conf.histfile
987987
cfg.InteractiveShell.banner1 = banner
988+
if conf.verb < 2:
989+
cfg.InteractiveShellEmbed.enable_tip = False
988990
# configuration can thus be specified here.
989991
_kwargs = {}
990992
if conf.interactive_shell == "ptipython":

0 commit comments

Comments
 (0)