Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scapy
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test-restored
platform
external
scapy
Commits
29a048a3
Commit
29a048a3
authored
9 years ago
by
Guillaume Valadon
Browse files
Options
Downloads
Plain Diff
Merged in p-l/scapy/issue-5126 (pull request #118)
Close pcap files in .__exit__() (fixes #5126)
parents
44b58a91
e62d456c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scapy/utils.py
+2
-1
2 additions, 1 deletion
scapy/utils.py
with
2 additions
and
1 deletion
scapy/utils.py
+
2
−
1
View file @
29a048a3
...
@@ -618,7 +618,7 @@ class RawPcapReader:
...
@@ -618,7 +618,7 @@ class RawPcapReader:
return
self
return
self
def
__exit__
(
self
,
exc_type
,
exc_value
,
tracback
):
def
__exit__
(
self
,
exc_type
,
exc_value
,
tracback
):
pass
self
.
close
()
class
PcapReader
(
RawPcapReader
):
class
PcapReader
(
RawPcapReader
):
...
@@ -750,6 +750,7 @@ class RawPcapWriter:
...
@@ -750,6 +750,7 @@ class RawPcapWriter:
return
self
return
self
def
__exit__
(
self
,
exc_type
,
exc_value
,
tracback
):
def
__exit__
(
self
,
exc_type
,
exc_value
,
tracback
):
self
.
flush
()
self
.
flush
()
self
.
close
()
class
PcapWriter
(
RawPcapWriter
):
class
PcapWriter
(
RawPcapWriter
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment