kamene icon indicating copy to clipboard operation
kamene copied to clipboard

How to hide warnings?

Open taoxinyi opened this issue 6 years ago • 5 comments

WARNING: can't import layer can: No module named 'fcntl' WARNING: Unless called manually, this could indicate deprecated use. Should be changed to bytes(self) WARNING: more Unless called manually, this could indicate deprecated use. Should be changed to bytes(self)

How to hide and suppress such warnings?

taoxinyi avatar Nov 28 '17 15:11 taoxinyi

import warnings
warnings.simplefilter("ignore")

Or when you run Python: python -W ignore script.py

Source

Many libraries make use of this module, so if you're shipping a user-facing terminal app it's useful to disable them unless you're debugging.

GhostofGoes avatar Dec 11 '17 17:12 GhostofGoes

Hi !

This issue has been resolved on the original scapy fork, which now supports Python 3 ! This fork (scapy3k) is missing many updates, bug fixes and tweaks. You can have a look at https://github.com/secdev/scapy to get more support !

Have a good day

gpotter2 avatar Jan 11 '18 21:01 gpotter2

The original does not yet support Python 3 in the full release, only the release candidates AFAIK.

GhostofGoes avatar Jan 12 '18 04:01 GhostofGoes

Dear @gpotter2 could you provide a patch or point to specific commit? For the people valuing code tested in production for 2+ years over release candidate.

phaethon avatar Jan 12 '18 06:01 phaethon

@gpotter2 Please don't post the same copy-paste comment in every issue on this repo. If the information is relevant to all, open a separate issue. The rc branch isn't done magical cure-all for every bug in this fork, unless I'm mistaken.

And apologies on posting comments unrelated to the issue. Didn't know where else I should address the comment spam that filled my motivations this evening.

GhostofGoes avatar Jan 12 '18 06:01 GhostofGoes