sbackup crahses: stop_if_no_target is not an option in general

Bug #489107 reported by Simon Wesp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sbackup
Fix Released
Medium
Unassigned
sbackup (Fedora)
Fix Released
Medium

Bug Description

The crash:
Summary: TB0a585590 ConfigParser.py:540:get:NoOptionError: No option 'stop_if_no_target' in section: 'general'

Traceback (most recent call last):
  File "/usr/sbin/simple-backup-config", line 579, in on_main_radio_group_changed
    self.parse_conf()
  File "/usr/sbin/simple-backup-config", line 402, in parse_conf
    if str(self.conf.get("general", "stop_if_no_target")) == "1":
  File "/usr/lib64/python2.6/ConfigParser.py", line 540, in get
    raise NoOptionError(option, section)
NoOptionError: No option 'stop_if_no_target' in section: 'general'

Local variables in innermost frame:
d: {'maxincrement': '7', 'lockfile': '/var/lock/sbackup.lock', 'target': '/var/backup', 'format': '1'}
vars: None
self: <ConfigParser.ConfigParser instance at 0x27b6248>
raw: False
section: general
option: stop_if_no_target

The fix:
diff -ur sbackup-0.10.5.orig/simple-backup-config.py sbackup-0.10.5/simple-backup-config.py
--- sbackup-0.10.5.orig/simple-backup-config.py 2009-11-23 22:40:03.110516695 +0100
+++ sbackup-0.10.5/simple-backup-config.py 2009-11-23 22:42:51.636395636 +0100
@@ -399,7 +399,7 @@
    self.widgets.get_widget("hbox26").set_sensitive( True )
    self.widgets.get_widget("dest_remote").set_text( ctarget )

- if str(self.conf.get("general", "stop_if_no_target")) == "1":
+ if self.conf.has_option("general", "stop_if_no_target") and str(self.conf.get("general", "stop_if_no_target")) == "1":
    self.widgets.get_widget("stop_if_no_target_checkbox").set_active( True )

   return good

Revision history for this message
In , Marcelo (marcelo-redhat-bugs) wrote :

abrt detected a crash.

Attached file: backtrace
cmdline: /usr/bin/python /usr/sbin/simple-backup-config
component: sbackup
executable: /usr/sbin/simple-backup-config
kernel: 2.6.31.5-127.fc12.x86_64
package: sbackup-0.10.5-8.fc12
uuid: 0a585590

Revision history for this message
In , Marcelo (marcelo-redhat-bugs) wrote :

Created attachment 373217
File: backtrace

Revision history for this message
In , Thomas (thomas-redhat-bugs) wrote :

Created attachment 373250
proposed patch

With this patch, sbackup checks first if option "stop_if_no_target" exists and if not, this won't check the config file for this and breaks.

This is currently untested...

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

sbackup-0.10.5-9.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/sbackup-0.10.5-9.fc12

Revision history for this message
In , Marcelo (marcelo-redhat-bugs) wrote :

The automatic bug reporter tool is a great idea :D

Revision history for this message
In , Christoph (christoph-redhat-bugs) wrote :

Yes, but please be so kind as to enter a comment on what you did when the app crashed before submitting the report.

Changed in sbackup (Fedora):
status: Unknown → Fix Committed
Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

sbackup-0.10.5-9.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with
 su -c 'yum --enablerepo=updates-testing update sbackup'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-12283

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

sbackup-0.10.5-9.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.

Changed in sbackup (Fedora):
status: Fix Committed → Fix Released
Changed in sbackup:
status: New → Fix Committed
Changed in sbackup:
status: Fix Committed → Fix Released
importance: Undecided → Medium
Changed in sbackup (Fedora):
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.