threads / patch / 20356

patchhg-to-git: don't import the unused popen2 module

Subject: [PATCH] hg-to-git: don't import the unused popen2 module

## tl;dr

One message between Aug 3, 2009 and Aug 3, 2009. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Miklos Vajna· Aug 3, 2009, 16:41 UTC · lore

Importing the popen2 module in Python-2.6 results in the "DeprecationWarning: The popen2 module is deprecated. Use the subprocess module." message. The module itself isn't used in fact, so just removing it solves the problem.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
 contrib/hg-to-git/hg-to-git.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to contrib/hg-to-git/hg-to-git.py +1 −1
diff --git a/contrib/hg-to-git/hg-to-git.py b/contrib/hg-to-git/hg-to-git.py
index 7b03204..2a6839d 100755
--- a/contrib/hg-to-git/hg-to-git.py
+++ b/contrib/hg-to-git/hg-to-git.py
@@ -20,7 +20,7 @@
 """
 
 import os, os.path, sys
-import tempfile, popen2, pickle, getopt
+import tempfile, pickle, getopt
 import re
 
 # Maps hg version -> git version
-- 
1.6.4

← back to recent threads