Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unhandled BaseException when "saving" without any changes being made #20

Closed
palli opened this issue Aug 15, 2012 · 1 comment
Closed

Comments

@palli
Copy link
Contributor

palli commented Aug 15, 2012

Environment:

Request Method: POST
Request URL: http://localhost:8000/objectbrowser/edit_object/id=616306914500298923

Django Version: 1.3.1
Python Version: 2.7.3
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'adagios.okconfig_',
'adagios.objectbrowser',
'adagios.rest',
'adagios.misc']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')

Traceback:
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response

  1.                     response = callback(request, _callback_args, *_callback_kwargs)
    
    File "/home/palli/workspace/adagios/adagios/objectbrowser/views.py" in edit_object
  2.             c['form'].save()
    
    File "/home/palli/workspace/adagios/adagios/objectbrowser/forms.py" in save
  3.     self.pynag_object.save()
    
    File "/opt/pynag/pynag/Model/init.py" in save
  4.     self._event(level='write', message="%s '%s'." % (self.object_type, self['shortname'] ))
    
    File "/opt/pynag/pynag/Model/init.py" in _event
  5.             i.write( object_definition=self, message=message )
    
    File "/opt/pynag/pynag/Model/EventHandlers/init.py" in write
  6.     self._git_commit(filename, message)
    
    File "/opt/pynag/pynag/Model/EventHandlers/init.py" in _git_commit
  7.     return self._run_command(command=command)
    
    File "/opt/pynag/pynag/Model/EventHandlers/init.py" in _run_command
  8.         raise BaseException( errorstring )
    

Exception Type: BaseException at /objectbrowser/edit_object/id=616306914500298923
Exception Value: Command 'git commit /etc/nagios3/okconfig/hosts/misc/bleh1.example.com-host.cfg -m 'service "bleh1.example.com/Running Processes".'' returned exit status 1.
stdout: # On branch master

Changes not staged for commit:

(use "git add/rm ..." to update what will be committed)

(use "git checkout -- ..." to discard changes in working directory)

deleted: okconfig/hosts/default/oldhostname-host.cfg

Untracked files:

(use "git add ..." to include in what will be committed)

okconfig/groups/testgroup.cfg

okconfig/hosts/default/localhost-host.cfg

okconfig/hosts/default/localhost-linux.cfg

okconfig/hosts/misc/bleh1.example.com-drbd.cfg

okconfig/hosts/misc/bleh10.example.com-drbd.cfg

okconfig/hosts/misc/bleh10.example.com-nagios.cfg

okconfig/hosts/misc/bleh100.example.com-nagios.cfg

okconfig/hosts/test.cfg

no changes added to commit (use "git add" and/or "git commit -a")

stderr:

@palli
Copy link
Contributor Author

palli commented Aug 15, 2012

fixed in pynag head. Git no longer tries to git commit when no changes have been made.

@palli palli closed this as completed Aug 15, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant