"'NoneType' is not iterable" with os.path.expandvars and "issue.bugtraqparameters"

Issue #1736 resolved
William Headrick
created an issue

It looks like change rev 12632 introduced this problem when trying to view the 'commit' panel. If I roll back to rev 12629, I have no trouble.

Here is the link to the change cst: https://bitbucket.org/tortoisehg/thg/changeset/20323e2709f8



Mercurial version (2.1.1). TortoiseHg version (2.3.1+7-75901a30bc85) Command: CWD: /home/billhead/Development/TortoiseHg/thg/thg Encoding: ascii Extensions loaded: extdiff, mq, hgk, hgshelve, convert Python version: 2.6.4 (r264:75706, Apr 17 2011, 11:24:50) [C] ** Qt-4.7.3 PyQt-4.8.5 Traceback (most recent call last): File "/home/billhead/Development/TortoiseHg/thg/thg/tortoisehg/hgqt/qtlib.py", line 981, in showEvent self.get() File "/home/billhead/Development/TortoiseHg/thg/thg/tortoisehg/hgqt/qtlib.py", line 993, in get self._widget = func() File "/home/billhead/Development/TortoiseHg/thg/thg/tortoisehg/hgqt/repowidget.py", line 354, in createCommitWidget cw = CommitWidget(self.repo, pats, opts, True, self, rev=self.rev) File "/home/billhead/Development/TortoiseHg/thg/thg/tortoisehg/hgqt/commit.py", line 63, in init opts['bugtraqparameters'] = os.path.expandvars(repo.ui.config('tortoisehg', 'issue.bugtraqparameters', None)) File "/usr/lib/python2.6/posixpath.py", line 280, in expandvars if '$' not in path: TypeError: argument of type 'NoneType' is not iterable


Comments (6)

  1. Eduard-Cristian Stefan
    • changed status to open

    A simple fix would be to use an empty string as the default value, instead of None. I have some proxy problems, and can't pull to create a proper patch.

    opts['bugtraqparameters'] = os.path.expandvars(repo.ui.config('tortoisehg', 'issue.bugtraqparameters', ''))
  2. Log in to comment