D6258: packaging: coerce paths to strings

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Tue Apr 16 18:46:35 EDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG69b4426d288b: packaging: coerce paths to strings (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6258?vs=14788&id=14790

REVISION DETAIL
  https://phab.mercurial-scm.org/D6258

AFFECTED FILES
  contrib/packaging/hgpackaging/util.py

CHANGE DETAILS

diff --git a/contrib/packaging/hgpackaging/util.py b/contrib/packaging/hgpackaging/util.py
--- a/contrib/packaging/hgpackaging/util.py
+++ b/contrib/packaging/hgpackaging/util.py
@@ -17,12 +17,12 @@
 
 
 def extract_tar_to_directory(source: pathlib.Path, dest: pathlib.Path):
-    with tarfile.open(source, 'r') as tf:
+    with tarfile.open(str(source), 'r') as tf:
         tf.extractall(dest)
 
 
 def extract_zip_to_directory(source: pathlib.Path, dest: pathlib.Path):
-    with zipfile.ZipFile(source, 'r') as zf:
+    with zipfile.ZipFile(str(source), 'r') as zf:
         zf.extractall(dest)
 
 



To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel


More information about the Mercurial-devel mailing list