diff options
author | Priit Laes <plaes@plaes.org> | 2010-07-02 00:09:06 +0300 |
---|---|---|
committer | Priit Laes <plaes@plaes.org> | 2010-07-02 00:09:06 +0300 |
commit | 3cf05bc77858e470f302d59879135a09928d2811 (patch) | |
tree | 1eab55928276853d7bd76bc1412d32376ddf5446 | |
parent | Made --initial-sync option working (diff) | |
download | gsoc2010-grumpy-3cf05bc77858e470f302d59879135a09928d2811.tar.gz gsoc2010-grumpy-3cf05bc77858e470f302d59879135a09928d2811.tar.bz2 gsoc2010-grumpy-3cf05bc77858e470f302d59879135a09928d2811.zip |
Store update file name in the settings
-rw-r--r-- | grumpy/models.py | 3 | ||||
-rwxr-xr-x | utils/grumpy_sync.py | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/grumpy/models.py b/grumpy/models.py index d964a87..676458a 100644 --- a/grumpy/models.py +++ b/grumpy/models.py @@ -104,6 +104,9 @@ class Setting(Base): def data(self): return json.loads(data) + def __repr__(self): + return '<%s> - %s' % (self.__class__.__name__, self.name) + class Herd(Base): """Represents herds in the system""" diff --git a/utils/grumpy_sync.py b/utils/grumpy_sync.py index b632580..111c8dc 100755 --- a/utils/grumpy_sync.py +++ b/utils/grumpy_sync.py @@ -52,7 +52,8 @@ def main(path, initial_sync): # ...and delete if it exists session.delete(updates) session.flush() - data = dict(moves=moves, mtime=int(os.stat(update_path).st_mtime)) + data = dict(file=update_file, moves=moves, \ + mtime=int(os.stat(update_path).st_mtime)) session.add(Setting('updates_info', data)) session.commit() # Initial sync does not need to deal with moves |