summaryrefslogtreecommitdiff
path: root/app-misc/binwalk/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /app-misc/binwalk/files
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'app-misc/binwalk/files')
-rw-r--r--app-misc/binwalk/files/binwalk-2.3.3-syntax-fix.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/app-misc/binwalk/files/binwalk-2.3.3-syntax-fix.patch b/app-misc/binwalk/files/binwalk-2.3.3-syntax-fix.patch
new file mode 100644
index 000000000000..5edd530b2293
--- /dev/null
+++ b/app-misc/binwalk/files/binwalk-2.3.3-syntax-fix.patch
@@ -0,0 +1,36 @@
+https://github.com/ReFirmLabs/binwalk/pull/585
+
+From bce53d1bb57c2e6dccf718147ebe9472779b7903 Mon Sep 17 00:00:00 2001
+From: Cameron Katri <me@cameronkatri.com>
+Date: Mon, 3 Jan 2022 15:20:39 -0500
+Subject: [PATCH] Fix SyntaxWarning message
+
+/usr/lib/python3/dist-packages/binwalk/modules/extractor.py:969: SyntaxWarning: "is" with a literal. Did you mean "=="?
+ if child_pid is 0:
+/usr/lib/python3/dist-packages/binwalk/modules/extractor.py:984: SyntaxWarning: "is" with a literal. Did you mean "=="?
+ if child_pid is 0:
+--- a/src/binwalk/modules/extractor.py
++++ b/src/binwalk/modules/extractor.py
+@@ -966,7 +966,7 @@ def shell_call(self, command):
+
+ # Fork a child process
+ child_pid = os.fork()
+- if child_pid is 0:
++ if child_pid == 0:
+ # Switch to the run-as user privileges, if one has been set
+ if self.runas_uid is not None and self.runas_gid is not None:
+ os.setgid(self.runas_uid)
+@@ -981,10 +981,10 @@ def shell_call(self, command):
+ rval = subprocess.call(shlex.split(command), stdout=tmp, stderr=tmp)
+
+ # A true child process should exit with the subprocess exit value
+- if child_pid is 0:
++ if child_pid == 0:
+ sys.exit(rval)
+ # If no os.fork() happened, just return the subprocess exit value
+- elif child_pid is None:
++ elif child_pid == None:
+ return rval
+ # Else, os.fork() happened and we're the parent. Wait and return the child's exit value.
+ else:
+