Commits

Ronny Pfannschmidt  committed f20716f

fix code, resuffle

  • Participants
  • Parent commits 687e65d

Comments (0)

Files changed (1)

File homedir-not-for-ci

          self.config = config
          ctxname = getcontextname()
 -        if ctxname == "jenkins":
-+        if ctxname.isalnum():
++        if ctxname is None:
++            reader = IniReader(self._cfg)
++            toxsection = "tox"
++            distshare_default = "{homedir}/.tox/distshare"
++            config.homedir = py.path.local._gethomedir()
++        elif ctxname.isalnum():
              reader = IniReader(self._cfg, fallbacksections=['tox'])
              toxsection = "tox:%s" % ctxname
              distshare_default = "{toxworkdir}/distshare"
 -        elif not ctxname:
+-            reader = IniReader(self._cfg)
+-            toxsection = "tox"
+-            distshare_default = "{homedir}/.tox/distshare"
 +            # if context is text, we are in ci and dont have a home
 +            config.homedir = None
-+        elif ctxname is None:
-             reader = IniReader(self._cfg)
-             toxsection = "tox"
-             distshare_default = "{homedir}/.tox/distshare"
-+            config.homedir = py.path.local._gethomedir()
          else:
 -            raise ValueError("invalid context")
 +            raise ValueError("invalid context %r"%ctxname)