Преглед изворни кода

Simplify how startup script end

The complex exits structure was simply not needed
oz123 пре 11 година
родитељ
комит
cc974d64d3
1 измењених фајлова са 7 додато и 7 уклоњено
  1. 7 7
      scripts/pwman3

+ 7 - 7
scripts/pwman3

@@ -178,14 +178,14 @@ except SystemExit, e:
     sys.exit(e)
 
 try:
+    cli.cmdloop()
+except KeyboardInterrupt, e:
+    print(e)
+
+
+if _saveconfig:
     try:
-        cli.cmdloop()
-    except KeyboardInterrupt, e:
-        print (e)
-finally:
-    try:
-        if _saveconfig:
-            config.save(args.cfile)
+        config.save(args.cfile)
     except Exception, e:
         print ("Error: %s" % e)
         sys.exit(-1)