Fixed running of standalone via command line. Also, only do save from

main() so that run-as-modal doesn't automatically save database.
This commit is contained in:
Barry Warsaw 1998-10-22 18:45:52 +00:00
parent fbba304aaa
commit 877d299292
1 changed files with 5 additions and 3 deletions

View File

@ -149,8 +149,6 @@ def run(app, s):
app.start() app.start()
except KeyboardInterrupt: except KeyboardInterrupt:
pass pass
# save the option database
s.save_views()
@ -182,7 +180,11 @@ def main():
elif opt in ('-i', '--initfile'): elif opt in ('-i', '--initfile'):
initfile = arg initfile = arg
run() app, sb = build(initialcolor=initialcolor,
initfile=initfile,
ignore=ignore)
run(app, sb)
sb.save_views()
if __name__ == '__main__': if __name__ == '__main__':