← Winnitude! Search  ·  Reader Mode (2289 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 12 LINKS

Issues with AutoInterrupt in conjunction with sys.exit on python 3.5 · Issue #463 · gitpython-developers/GitPython

Repository navigation

Issues with AutoInterrupt in conjunction with sys.exit on python 3.5  #463


New issue

New issue

Closed

Closed
Issues with AutoInterrupt in conjunction with sys.exit on python 3.5 #463 Labels
acknowledged

waiting for feedback
Milestone v2.1.4 - Bugfixes

Description

@Heiko-san's profile Heiko-san opened on Jun 6, 2016

The destructor of the cmd class (actually AutoInterrupt) seems to throw some errors using python 3.5 on Arclinux:

Exception ignored in: <bound method Git.AutoInterrupt.__del__ of <git.cmd.Git.AutoInterrupt object at 0x7f7c2b101d68>>
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/git/cmd.py", line 294, in __del__
TypeError: 'NoneType' object is not callable
Exception ignored in: <bound method Git.AutoInterrupt.__del__ of <git.cmd.Git.AutoInterrupt object at 0x7f7c2b101cc0>>
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/git/cmd.py", line 294, in __del__
TypeError: 'NoneType' object is not callable

It seems this error is triggered by a call to sys.exit(0) at the end of my script, since it doesn't appear if I comment it out.
However I couldn't reproduce this behavior with python 2.7, here sys.exit(0) seems to be working with the module correctly.

What I do is simply clone a repo, add some files commit and push them to a remote.

...
repo = Repo.clone_from(target_git_path, target_temp_dir)
...
repo.index.add([file])
...
repo.index.commit('Initial commit')
...
refspec='refs/heads/{0}:refs/heads/{0}'.format(repo.active_branch) # this will fix error if user has set "push.default = matching"
repo.remotes.origin.push(refspec=refspec)

Metadata

Metadata

Assignees

No one assigned

    Labels


    acknowledged

    waiting for feedback

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions