From 7eaf5bf72656fa84d2aa94a0ea6e534120f40131 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Sat, 31 Aug 2013 11:07:49 -0500 Subject: [PATCH] reset stdout in prequeue.py near end Other output shouldn't be dumped into items/item_attributes.tx by default. --- prequeue.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/prequeue.py b/prequeue.py index 58790f702..6efc519d1 100644 --- a/prequeue.py +++ b/prequeue.py @@ -13,11 +13,16 @@ def main(): macros = preprocessor.load_pokecrystal_macros() macro_table = preprocessor.make_macro_table(macros) + stdout = sys.stdout + for source in sys.argv[1:]: dest = os.path.splitext(source)[0] + '.tx' sys.stdin = open(source, 'r') sys.stdout = open(dest, 'w') preprocessor.preprocess(macro_table) + # reset stdout + sys.stdout = stdout + if __name__ == '__main__': main()