Patchwork D6258: packaging: coerce paths to strings

login
register
mail settings
Submitter phabricator
Date April 16, 2019, 10:46 p.m.
Message ID <827f125bd1aa763f5adde4bf588ecff9@localhost.localdomain>
Download mbox | patch
Permalink /patch/39672/
State Not Applicable
Headers show

Comments

phabricator - April 16, 2019, 10:46 p.m.
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




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

Patch

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)