Patchwork D7624: rcutil: don't check if defaultrc/ is a directory -- we know it is

login
register
mail settings
Submitter phabricator
Date Dec. 17, 2019, 4:43 p.m.
Message ID <89ee21f172a5f77112d57d93c3b5ee51@localhost.localdomain>
Download mbox | patch
Permalink /patch/43926/
State Not Applicable
Headers show

Comments

phabricator - Dec. 17, 2019, 4:43 p.m.
Closed by commit rHG86fe85364811: rcutil: don&#039;t check if defaultrc/ is a directory -- we know it is (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7624?vs=18654&id=18815

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7624/new/

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

AFFECTED FILES
  mercurial/rcutil.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/rcutil.py b/mercurial/rcutil.py
--- a/mercurial/rcutil.py
+++ b/mercurial/rcutil.py
@@ -63,11 +63,8 @@ 
 
 def defaultrcpath():
     '''return rc paths in defaultrc'''
-    path = []
     defaultpath = os.path.join(resourceutil.datapath, b'defaultrc')
-    if os.path.isdir(defaultpath):
-        path = _expandrcpath(defaultpath)
-    return path
+    return _expandrcpath(defaultpath)
 
 
 def rccomponents():