summaryrefslogtreecommitdiffstats
path: root/pyfirstaidkit/utils
diff options
context:
space:
mode:
authorJoel Andres Granados <jgranado@redhat.com>2008-11-19 13:46:14 +0100
committerJoel Andres Granados <jgranado@redhat.com>2008-11-19 18:44:24 +0100
commitb8d360b0142961972e4d7bfa67841542554725a3 (patch)
tree2b25cce5a9be006c17229dcb884bf9fd726d0b1b /pyfirstaidkit/utils
parent1b32e6c8032db019a191d3fa37430371de1b9c34 (diff)
downloadfirstaidkit-b8d360b0142961972e4d7bfa67841542554725a3.tar.gz
firstaidkit-b8d360b0142961972e4d7bfa67841542554725a3.tar.xz
firstaidkit-b8d360b0142961972e4d7bfa67841542554725a3.zip
Various small fixes.
Makefile: 1. Cut counts from 1 not 0. 2. Create the "about" info in the makefile instead of spec file. 3. Put subdirs and about targets into one build target. firstaidkit.spec: 1. Erase the about creation from here. 2. Erase the fedora 7 specific stuff. 3. Call make build. 4. xserver plugin does not need rhpl nor rhpxl anymore. 5. Actually include the COPYING file where the about says it is. configuration.py: 1. Change the default backup dir from /tmp/fakbackup to /tmp. /tmp/fakbackup caused some file permission strangeness when a non root user executed fak after root had executed it. This can still occur, but it will be left like this as the user should not execute fak in non root anyway. logging: plugins.py,interpreter.py. __init__.py 1. Always use the reporting object when possible. 2. Add time stamp and level of message to log messages.
Diffstat (limited to 'pyfirstaidkit/utils')
-rw-r--r--pyfirstaidkit/utils/backup.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/pyfirstaidkit/utils/backup.py b/pyfirstaidkit/utils/backup.py
index 2a11283..7c4537f 100644
--- a/pyfirstaidkit/utils/backup.py
+++ b/pyfirstaidkit/utils/backup.py
@@ -78,12 +78,14 @@ class FileBackupStore(BackupStoreInterface):
self._metafile = "__meta.pickle"
self._data = {} # name -> (stored as, origin)
self._origin = {} # origin -> name
+ # Because the dir is suppose to be there when we are reverting.
if not reverting:
os.makedirs(self._path)
def saveMeta(self):
f = open(os.path.join(self._path, self._metafile), "wb")
- pickle.dump((self._id, self._data, self._origin), f, pickle.HIGHEST_PROTOCOL)
+ pickle.dump((self._id, self._data, self._origin), f, \
+ pickle.HIGHEST_PROTOCOL)
f.close()
return True
@@ -96,7 +98,8 @@ class FileBackupStore(BackupStoreInterface):
self._data = data
self._origin = origin
else:
- raise BackupException("Loading metadata for different Backup (ID mismatch: '%s' and '%s')" % (self._id, id))
+ raise BackupException("Loading metadata for different Backup " \
+ "(ID mismatch: '%s' and '%s')" % (self._id, id))
return True