changeset 3:189f4a0bc653

don't try to pass bytes to pathlib.Path
author Paul Fisher <paul@pfish.zone>
date Sat, 14 Feb 2026 18:53:30 -0500
parents 871dcb2a2aeb
children 5ad58438318a
files src/git_serve/__init__.py
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/git_serve/__init__.py	Sat Feb 14 18:46:46 2026 -0500
+++ b/src/git_serve/__init__.py	Sat Feb 14 18:53:30 2026 -0500
@@ -3,8 +3,7 @@
 import binascii
 import email.parser
 import email.policy
-import os
-import pathlib
+import os.path
 import re
 import shutil
 import subprocess
@@ -190,9 +189,8 @@
     never_export = ui.configbool(b'git-serve', b'never-export')
     if never_export:
         return
-    git_repo = pathlib.Path(repo.githandler.gitdir)
     always_export = ui.configbool(b'git-serve', b'always-export', False)
-    if always_export or git_repo.exists():
+    if always_export or os.path.isdir(repo.githandler.gitdir):
         export_repo(repo)
 
 
@@ -208,7 +206,7 @@
 
 # Interfacing with Mercurial
 
-__version__ = '0.1'
+__version__ = '0.1.1'
 
 cmdtable: dict[bytes, object] = {}