Edgewall Software

Opened 10 years ago

Last modified 10 years ago

#11505 closed defect

Exception TypeError: "'NoneType' object is not callable" in <function <lambda> at 0xb98f9b0> ignored — at Initial Version

Reported by: Ryan J Ollos Owned by:
Priority: normal Milestone: 1.0.2
Component: general Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

This issue was first mentioned in comment:1:ticket:11249, with a good hint about the problem in comment:2:ticket:11249. Running the tests with python setup.py test yields more info about the exception (as opposed to running python -m trac.test, which yields on the output in comment:1:ticket:11249):

$ python setup.py test -m tracopt.versioncontrol.git.tests
running test
running egg_info
unrecognized .svn/entries format; skipping .
writing requirements to Trac.egg-info/requires.txt
writing Trac.egg-info/PKG-INFO
writing top-level names to Trac.egg-info/top_level.txt
writing dependency_links to Trac.egg-info/dependency_links.txt
writing entry points to Trac.egg-info/entry_points.txt
unrecognized .svn/entries format in /home/user/Workspace/t11500/teo-rjollos.git
reading manifest file 'Trac.egg-info/SOURCES.txt'
writing manifest file 'Trac.egg-info/SOURCES.txt'
running build_ext
test_git_version (tracopt.versioncontrol.git.tests.PyGIT.GitTestCase) ... ok
test_is_sha (tracopt.versioncontrol.git.tests.PyGIT.GitTestCase) ... ok
test_parse (tracopt.versioncontrol.git.tests.PyGIT.TestParseCommit) ... ok
test_control_files_detection (tracopt.versioncontrol.git.tests.PyGIT.NormalTestCase) ... ok
test_get_branches_with_cr_in_commitlog (tracopt.versioncontrol.git.tests.PyGIT.NormalTestCase) ... ok
test_node_get_history_with_empty_commit (tracopt.versioncontrol.git.tests.PyGIT.NormalTestCase) ... ok
test_rev_is_anchestor_of (tracopt.versioncontrol.git.tests.PyGIT.NormalTestCase) ... ok
test_sync_after_removing_branch (tracopt.versioncontrol.git.tests.PyGIT.NormalTestCase) ... ok
test_turn_off_persistent_cache (tracopt.versioncontrol.git.tests.PyGIT.NormalTestCase) ... ok
test_get_historian (tracopt.versioncontrol.git.tests.PyGIT.UnicodeNameTestCase) ... ok
test_ls_tree (tracopt.versioncontrol.git.tests.PyGIT.UnicodeNameTestCase) ... ok
test_unicode_branches (tracopt.versioncontrol.git.tests.PyGIT.UnicodeNameTestCase) ... ok
test_unicode_filename (tracopt.versioncontrol.git.tests.PyGIT.UnicodeNameTestCase) ... ok
test_unicode_tags (tracopt.versioncontrol.git.tests.PyGIT.UnicodeNameTestCase) ... ok
test_unicode_verifyrev (tracopt.versioncontrol.git.tests.PyGIT.UnicodeNameTestCase) ... ok
test_bare (tracopt.versioncontrol.git.tests.git_fs.SanityCheckingTestCase) ... ok
test_no_head_file (tracopt.versioncontrol.git.tests.git_fs.SanityCheckingTestCase) ... ok
test_no_objects_dir (tracopt.versioncontrol.git.tests.git_fs.SanityCheckingTestCase) ... ok
test_no_refs_dir (tracopt.versioncontrol.git.tests.git_fs.SanityCheckingTestCase) ... ok
test_non_bare (tracopt.versioncontrol.git.tests.git_fs.SanityCheckingTestCase) ... ok
test_non_persistent (tracopt.versioncontrol.git.tests.git_fs.PersistentCacheTestCase) ... ok
test_persistent (tracopt.versioncontrol.git.tests.git_fs.PersistentCacheTestCase) ... ok
test_with_cache (tracopt.versioncontrol.git.tests.git_fs.HistoryTimeRangeTestCase) ... ok
test_without_cache (tracopt.versioncontrol.git.tests.git_fs.HistoryTimeRangeTestCase) ... ok

----------------------------------------------------------------------
Ran 24 tests in 1.566s

OK
Exception TypeError: TypeError("'NoneType' object is not callable",) in <bound method Storage.__del__ of <tracopt.versioncontrol.git.PyGIT.Storage object at 0x4474b50>> ignored
Exception TypeError: TypeError("'NoneType' object is not callable",) in <bound method Storage.__del__ of <tracopt.versioncontrol.git.PyGIT.Storage object at 0x4471f90>> ignored

The exception is avoided with the following change:

  • tracopt/versioncontrol/git/PyGIT.py

    diff --git a/tracopt/versioncontrol/git/PyGIT.py b/tracopt/versioncontrol/git/Py
    index 14e2886..c8285a6 100644
    a b class Storage(object):  
    411411        with self.__cat_file_pipe_lock:
    412412            if self.__cat_file_pipe is not None:
    413413                self.__cat_file_pipe.stdin.close()
    414                 terminate(self.__cat_file_pipe)
     414                # terminate(self.__cat_file_pipe)
    415415                self.__cat_file_pipe.wait()
    416416
    417417    #

Side note: the tests can't actually be run using python setup.py test -m tracopt.versioncontrol.git.tests without other changes, but this will be addressed in the next ticket.

However, this change does not fix the issue as I would have expected:

  • tracopt/versioncontrol/git/PyGIT.py

    diff --git a/tracopt/versioncontrol/git/PyGIT.py b/tracopt/versioncontrol/git/Py
    index 14e2886..ad03f5d 100644
    a b class Storage(object):  
    411411        with self.__cat_file_pipe_lock:
    412412            if self.__cat_file_pipe is not None:
    413413                self.__cat_file_pipe.stdin.close()
    414                 terminate(self.__cat_file_pipe)
    415                 self.__cat_file_pipe.wait()
     414                if self.__cat_file_pipe is not None:
     415                    terminate(self.__cat_file_pipe)
     416                    self.__cat_file_pipe.wait()
    416417
    417418    #
    418419    # cache handling

Change History (0)

Note: See TracTickets for help on using tickets.