Exemple #1
0
def snap(mainmodule, snapshot):
    import os
    # XXX raises an exception in Windows if oldsnapshot exists
    # XXX should never overwrite old snapshots
    name = snapshot.__name__
    # mainmodule.upgrade()
    os.rename(name + '.py', 'old' + name)
    doss.serialize(mainmodule.get_system(), 
                   mainmodule.get_module_names_used_persistently(),
                   file(name + '.py', 'w'))
Exemple #2
0
def main():
    try:
        start()
    except KeyboardInterrupt:
        print '^C received, shutting down server'
        server.socket.close()
        import os
        # XXX raises an exception in Windows if oldsnapshot exists
        # XXX should never overwrite old snapshots
        os.rename('snapshot.py', 'oldsnapshot')
        doss.serialize(registry.get_system(), file('snapshot.py', 'w'))
Exemple #3
0
def main():
    try:
        start()
    except KeyboardInterrupt:
        print('^C received, shutting down server')
        server.socket.close()
        import os
        # XXX raises an exception in Windows if oldsnapshot exists
        # XXX should never overwrite old snapshots
        os.rename('snapshot.py', 'oldsnapshot')
        doss.serialize(registry.get_system(), open('snapshot.py', 'w'))
Exemple #4
0
    def log(self):
        # XXX quick hack
        import doss

        doss.serialize(self, ("sniki",), file("changes.py", "a"))