marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This is a gratuitous readability change.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/run-tests.py

CHANGE DETAILS

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -3575,9 +3575,10 @@
             # not be in PATH by default.
             extra_paths = [exedir]
             vi = sys.version_info
-            if 'APPDATA' in os.environ:
+            appdata = os.environ.get('APPDATA')
+            if appdata is not None:
                 scripts_dir = os.path.join(
-                    os.environ['APPDATA'],
+                    appdata,
                     'Python',
                     'Python%d%d' % (vi[0], vi[1]),
                     'Scripts',
@@ -3585,7 +3586,7 @@
 
                 if vi.major == 2:
                     scripts_dir = os.path.join(
-                        os.environ['APPDATA'],
+                        appdata,
                         'Python',
                         'Scripts',
                     )



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to